Inkscape
Vector Graphics Editor
|
#include <random.h>
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 |
![]() | |
Parameter (Glib::ustring label, Glib::ustring tip, Glib::ustring key, Inkscape::UI::Widget::Registry *wr, Effect *effect) | |
virtual | ~Parameter () |
Parameter (const Parameter &)=delete | |
Parameter & | operator= (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 |
![]() | |
bool | _updating = false |
Inkscape::Display::TemporaryItem * | ownerlocator = nullptr |
Effect * | param_effect |
Private Member Functions | |
void | on_value_changed () |
long | setup_seed (long) |
gdouble | rand () |
RandomParam (const RandomParam &)=delete | |
RandomParam & | operator= (const RandomParam &)=delete |
Additional Inherited Members | |
![]() | |
sigc::scoped_connection | selection_changed_connection |
Glib::ustring | param_key |
Glib::ustring | param_tooltip |
Inkscape::UI::Widget::Registry * | param_wr |
Glib::ustring | param_label |
bool | oncanvas_editable |
bool | widget_is_visible |
bool | widget_is_enabled |
![]() | |
void | param_write_to_repr (const char *svgd) |
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.
|
privatedelete |
|
inline |
Definition at line 46 of file random.h.
References value.
Referenced by Inkscape::LivePathEffect::LPERoughen::doBeforeEffect(), Inkscape::LivePathEffect::LPECurveStitch::doEffect_path(), Inkscape::LivePathEffect::LPERoughHatches::generateLevels(), and Inkscape::LivePathEffect::LPERoughHatches::smoothSnake().
|
private |
Definition at line 181 of file random.cpp.
References Inkscape::LivePathEffect::Parameter::param_effect, and Inkscape::LivePathEffect::Effect::refresh_widgets.
Referenced by param_newWidget().
Inkscape::LivePathEffect::RandomParam::operator gdouble | ( | ) |
Definition at line 186 of file random.cpp.
|
privatedelete |
|
inline |
Definition at line 38 of file random.h.
References rand().
Referenced by Inkscape::LivePathEffect::LPETiling::doAfterEffect(), Inkscape::LivePathEffect::LPETiling::doBeforeEffect(), and Inkscape::LivePathEffect::LPETiling::doEffect_path_post().
|
overridevirtual |
Implements Inkscape::LivePathEffect::Parameter.
Definition at line 77 of file random.cpp.
References defseed, defvalue, and Inkscape::SVGOStringStream::str().
|
overridevirtual |
Implements Inkscape::LivePathEffect::Parameter.
Definition at line 69 of file random.cpp.
References startseed, Inkscape::SVGOStringStream::str(), and value.
void Inkscape::LivePathEffect::RandomParam::param_make_integer | ( | bool | yes = true | ) |
Definition at line 149 of file random.cpp.
References integer.
|
overridevirtual |
Implements Inkscape::LivePathEffect::Parameter.
Definition at line 161 of file random.cpp.
References Inkscape::LivePathEffect::Effect::getRepr(), Inkscape::LivePathEffect::Effect::getSPDoc(), integer, max, min, on_value_changed(), Inkscape::LivePathEffect::Parameter::param_effect, Inkscape::LivePathEffect::Parameter::param_key, Inkscape::LivePathEffect::Parameter::param_label, Inkscape::LivePathEffect::Parameter::param_tooltip, Inkscape::LivePathEffect::Parameter::param_wr, startseed, and value.
|
override |
Definition at line 49 of file random.cpp.
References defseed, param_set_value(), and sp_svg_number_read_d().
|
overridevirtual |
Implements Inkscape::LivePathEffect::Parameter.
Definition at line 85 of file random.cpp.
References defseed, defvalue, and param_set_value().
|
inline |
Definition at line 36 of file random.h.
References _randomsign.
Referenced by Inkscape::LivePathEffect::LPERoughen::doBeforeEffect(), and Inkscape::LivePathEffect::LPETiling::LPETiling().
void Inkscape::LivePathEffect::RandomParam::param_set_range | ( | gdouble | min, |
gdouble | max | ||
) |
Definition at line 129 of file random.cpp.
References max, min, and SCALARPARAM_G_MAXDOUBLE.
Referenced by Inkscape::LivePathEffect::LPERoughen::LPERoughen(), Inkscape::LivePathEffect::LPERoughHatches::LPERoughHatches(), and Inkscape::LivePathEffect::LPETiling::LPETiling().
void Inkscape::LivePathEffect::RandomParam::param_set_value | ( | gdouble | val, |
long | newseed | ||
) |
Definition at line 105 of file random.cpp.
References Inkscape::LivePathEffect::Parameter::effectType(), integer, Inkscape::LivePathEffect::Effect::lpeversion, max, min, Inkscape::LivePathEffect::Parameter::param_effect, Inkscape::LivePathEffect::HiddenParam::param_getSVGValue(), rand(), RAND_m, Inkscape::LivePathEffect::ROUGH_HATCHES, Inkscape::LivePathEffect::ROUGHEN, seed, setup_seed(), startseed, and value.
Referenced by Inkscape::LivePathEffect::LPERoughen::doBeforeEffect(), param_readSVGValue(), param_set_default(), and Inkscape::LivePathEffect::LPERoughHatches::resetDefaults().
|
override |
Definition at line 96 of file random.cpp.
References param_update_default(), and sp_svg_number_read_d().
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().
|
inlineoverridevirtual |
Implements Inkscape::LivePathEffect::Parameter.
Definition at line 47 of file random.h.
References Inkscape::LivePathEffect::RANDOM.
|
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().
void Inkscape::LivePathEffect::RandomParam::resetRandomizer | ( | ) |
Definition at line 155 of file random.cpp.
References seed, and startseed.
Referenced by Inkscape::LivePathEffect::LPERoughHatches::doBeforeEffect(), Inkscape::LivePathEffect::LPETiling::doBeforeEffect(), Inkscape::LivePathEffect::LPERoughen::doBeforeEffect(), and Inkscape::LivePathEffect::LPECurveStitch::doEffect_path().
|
private |
|
protected |
Definition at line 58 of file random.h.
Referenced by param_set_randomsign(), and RandomParam().
|
protected |
Definition at line 52 of file random.h.
Referenced by param_getDefaultSVGValue(), param_readSVGValue(), param_set_default(), and RandomParam().
|
protected |
Definition at line 59 of file random.h.
Referenced by param_getDefaultSVGValue(), param_set_default(), param_update_default(), and RandomParam().
|
protected |
Definition at line 57 of file random.h.
Referenced by param_make_integer(), param_newWidget(), param_set_value(), and RandomParam().
|
protected |
Definition at line 56 of file random.h.
Referenced by param_newWidget(), param_set_range(), param_set_value(), and RandomParam().
|
protected |
Definition at line 55 of file random.h.
Referenced by param_newWidget(), param_set_range(), param_set_value(), and RandomParam().
|
protected |
Definition at line 51 of file random.h.
Referenced by param_set_value(), rand(), RandomParam(), and resetRandomizer().
|
protected |
Definition at line 50 of file random.h.
Referenced by param_getSVGValue(), param_newWidget(), param_set_value(), RandomParam(), and resetRandomizer().
|
protected |
Definition at line 54 of file random.h.
Referenced by get_value(), param_getSVGValue(), param_newWidget(), param_set_value(), and RandomParam().