Inkscape
Vector Graphics Editor
Loading...
Searching...
No Matches
Inkscape::LivePathEffect::RandomParam Class Reference

#include <random.h>

Inheritance diagram for Inkscape::LivePathEffect::RandomParam:
Inkscape::LivePathEffect::Parameter

Public Member Functions

 RandomParam (const Glib::ustring &label, const Glib::ustring &tip, const Glib::ustring &key, Inkscape::UI::Widget::Registry *wr, Effect *effect, gdouble default_value=1.0, long default_seed=0, bool randomsign=false)
 
bool param_readSVGValue (const gchar *strvalue) override
 
Glib::ustring param_getSVGValue () const override
 
Glib::ustring param_getDefaultSVGValue () const override
 
void param_set_default () override
 
void param_set_randomsign (bool randomsign)
 
Gtk::Widget * param_newWidget () override
 
double param_get_random_number ()
 
void param_set_value (gdouble val, long newseed)
 
void param_make_integer (bool yes=true)
 
void param_set_range (gdouble min, gdouble max)
 
void param_update_default (gdouble default_value)
 
void param_update_default (const gchar *default_value) override
 
void resetRandomizer ()
 
 operator gdouble ()
 
gdouble get_value ()
 
ParamType paramType () const override
 
- Public Member Functions inherited from Inkscape::LivePathEffect::Parameter
 Parameter (Glib::ustring label, Glib::ustring tip, Glib::ustring key, Inkscape::UI::Widget::Registry *wr, Effect *effect)
 
virtual ~Parameter ()
 
 Parameter (const Parameter &)=delete
 
Parameteroperator= (const Parameter &)=delete
 
virtual bool param_readSVGValue (char const *strvalue)=0
 
virtual void param_widget_is_visible (bool is_visible)
 
virtual void param_widget_is_enabled (bool is_enabled)
 
void write_to_SVG ()
 
void read_from_SVG ()
 
void setUpdating (bool updating)
 
bool getUpdating () const
 
virtual void param_update_default (char const *default_value)=0
 
Glib::ustring const * param_getTooltip () const
 
virtual bool providesKnotHolderEntities () const
 
virtual void addKnotHolderEntities (KnotHolder *, SPItem *)
 
virtual void addCanvasIndicators (SPLPEItem const *, std::vector< Geom::PathVector > &)
 
virtual void param_editOncanvas (SPItem *, SPDesktop *)
 
virtual void param_setup_nodepath (Inkscape::NodePath::Path *)
 
virtual void param_transform_multiply (Geom::Affine const &, bool set)
 
virtual std::vector< SPObject * > param_get_satellites ()
 
void param_higlight (bool highlight)
 
void change_selection (Inkscape::Selection *selection)
 
void update_satellites ()
 
EffectType effectType () const
 
void connect_selection_changed ()
 

Protected Attributes

long startseed
 
long seed
 
long defseed
 
gdouble value
 
gdouble min
 
gdouble max
 
bool integer
 
bool _randomsign
 
gdouble defvalue
 
- Protected Attributes inherited from Inkscape::LivePathEffect::Parameter
bool _updating = false
 
Inkscape::Display::TemporaryItemownerlocator = nullptr
 
Effectparam_effect
 

Private Member Functions

void on_value_changed ()
 
long setup_seed (long)
 
gdouble rand ()
 
 RandomParam (const RandomParam &)=delete
 
RandomParamoperator= (const RandomParam &)=delete
 

Additional Inherited Members

- Public Attributes inherited from Inkscape::LivePathEffect::Parameter
sigc::scoped_connection selection_changed_connection
 
Glib::ustring param_key
 
Glib::ustring param_tooltip
 
Inkscape::UI::Widget::Registryparam_wr
 
Glib::ustring param_label
 
bool oncanvas_editable
 
bool widget_is_visible
 
bool widget_is_enabled
 
- Protected Member Functions inherited from Inkscape::LivePathEffect::Parameter
void param_write_to_repr (const char *svgd)
 

Detailed Description

Definition at line 21 of file random.h.

Constructor & Destructor Documentation

◆ RandomParam() [1/2]

Inkscape::LivePathEffect::RandomParam::RandomParam ( const Glib::ustring &  label,
const Glib::ustring &  tip,
const Glib::ustring &  key,
Inkscape::UI::Widget::Registry wr,
Effect effect,
gdouble  default_value = 1.0,
long  default_seed = 0,
bool  randomsign = false 
)

Definition at line 31 of file random.cpp.

References _randomsign, defseed, defvalue, integer, max, min, SCALARPARAM_G_MAXDOUBLE, seed, startseed, and value.

◆ RandomParam() [2/2]

Inkscape::LivePathEffect::RandomParam::RandomParam ( const RandomParam )
privatedelete

Member Function Documentation

◆ get_value()

◆ on_value_changed()

void Inkscape::LivePathEffect::RandomParam::on_value_changed ( )
private

◆ operator gdouble()

Inkscape::LivePathEffect::RandomParam::operator gdouble ( )

Definition at line 186 of file random.cpp.

◆ operator=()

RandomParam & Inkscape::LivePathEffect::RandomParam::operator= ( const RandomParam )
privatedelete

◆ param_get_random_number()

double Inkscape::LivePathEffect::RandomParam::param_get_random_number ( )
inline

◆ param_getDefaultSVGValue()

Glib::ustring Inkscape::LivePathEffect::RandomParam::param_getDefaultSVGValue ( ) const
overridevirtual

Implements Inkscape::LivePathEffect::Parameter.

Definition at line 77 of file random.cpp.

References defseed, defvalue, and Inkscape::SVGOStringStream::str().

◆ param_getSVGValue()

Glib::ustring Inkscape::LivePathEffect::RandomParam::param_getSVGValue ( ) const
overridevirtual

Implements Inkscape::LivePathEffect::Parameter.

Definition at line 69 of file random.cpp.

References startseed, Inkscape::SVGOStringStream::str(), and value.

◆ param_make_integer()

void Inkscape::LivePathEffect::RandomParam::param_make_integer ( bool  yes = true)

Definition at line 149 of file random.cpp.

References integer.

◆ param_newWidget()

◆ param_readSVGValue()

bool Inkscape::LivePathEffect::RandomParam::param_readSVGValue ( const gchar *  strvalue)
override

Definition at line 49 of file random.cpp.

References defseed, param_set_value(), and sp_svg_number_read_d().

◆ param_set_default()

void Inkscape::LivePathEffect::RandomParam::param_set_default ( )
overridevirtual

Implements Inkscape::LivePathEffect::Parameter.

Definition at line 85 of file random.cpp.

References defseed, defvalue, and param_set_value().

◆ param_set_randomsign()

void Inkscape::LivePathEffect::RandomParam::param_set_randomsign ( bool  randomsign)
inline

◆ param_set_range()

void Inkscape::LivePathEffect::RandomParam::param_set_range ( gdouble  min,
gdouble  max 
)

◆ param_set_value()

◆ param_update_default() [1/2]

void Inkscape::LivePathEffect::RandomParam::param_update_default ( const gchar *  default_value)
override

Definition at line 96 of file random.cpp.

References param_update_default(), and sp_svg_number_read_d().

◆ param_update_default() [2/2]

void Inkscape::LivePathEffect::RandomParam::param_update_default ( gdouble  default_value)

Definition at line 91 of file random.cpp.

References defvalue.

Referenced by param_update_default().

◆ paramType()

ParamType Inkscape::LivePathEffect::RandomParam::paramType ( ) const
inlineoverridevirtual

Implements Inkscape::LivePathEffect::Parameter.

Definition at line 47 of file random.h.

References Inkscape::LivePathEffect::RANDOM.

◆ rand()

gdouble Inkscape::LivePathEffect::RandomParam::rand ( )
private

Definition at line 205 of file random.cpp.

References BSize, RAND_a, RAND_m, RAND_q, RAND_r, result, and seed.

Referenced by param_get_random_number(), and param_set_value().

◆ resetRandomizer()

◆ setup_seed()

long Inkscape::LivePathEffect::RandomParam::setup_seed ( long  lSeed)
private

Definition at line 196 of file random.cpp.

References RAND_m.

Referenced by param_set_value().

Member Data Documentation

◆ _randomsign

bool Inkscape::LivePathEffect::RandomParam::_randomsign
protected

Definition at line 58 of file random.h.

Referenced by param_set_randomsign(), and RandomParam().

◆ defseed

long Inkscape::LivePathEffect::RandomParam::defseed
protected

◆ defvalue

gdouble Inkscape::LivePathEffect::RandomParam::defvalue
protected

◆ integer

bool Inkscape::LivePathEffect::RandomParam::integer
protected

Definition at line 57 of file random.h.

Referenced by param_make_integer(), param_newWidget(), param_set_value(), and RandomParam().

◆ max

gdouble Inkscape::LivePathEffect::RandomParam::max
protected

Definition at line 56 of file random.h.

Referenced by param_newWidget(), param_set_range(), param_set_value(), and RandomParam().

◆ min

gdouble Inkscape::LivePathEffect::RandomParam::min
protected

Definition at line 55 of file random.h.

Referenced by param_newWidget(), param_set_range(), param_set_value(), and RandomParam().

◆ seed

long Inkscape::LivePathEffect::RandomParam::seed
protected

Definition at line 51 of file random.h.

Referenced by param_set_value(), rand(), RandomParam(), and resetRandomizer().

◆ startseed

long Inkscape::LivePathEffect::RandomParam::startseed
protected

◆ value

gdouble Inkscape::LivePathEffect::RandomParam::value
protected

Definition at line 54 of file random.h.

Referenced by get_value(), param_getSVGValue(), param_newWidget(), param_set_value(), and RandomParam().


The documentation for this class was generated from the following files: