Inkscape
Vector Graphics Editor
Loading...
Searching...
No Matches
SPGradient Class Reference

Gradient. More...

#include <sp-gradient.h>

Inheritance diagram for SPGradient:
SPPaintServer SPObject Inkscape::XML::NodeObserver SPLinearGradient SPMeshGradient SPRadialGradient

Public Member Functions

 SPGradient ()
 
 ~SPGradient () override
 
int tag () const override
 
SPGradientVector const & getGradientVector () const
 
bool hasStops () const
 
SPStopgetFirstStop ()
 
int getStopCount () const
 
bool isEquivalent (SPGradient *b)
 return true if this gradient is "equivalent" to that gradient.
 
bool isAligned (SPGradient *b)
 return true if this gradient is "aligned" to that gradient.
 
bool hasPatches () const
 
bool isUnitsSet () const
 All Gradients.
 
SPGradientUnits getUnits () const
 
void setUnits (SPGradientUnits units)
 Set units property of gradient and emit modified.
 
bool isSpreadSet () const
 
SPGradientSpread getSpread () const
 
SPGradientgetVector (bool force_private=false)
 Returns private vector of given gradient (the gradient at the end of the href chain which has stops), optionally normalizing it.
 
SPGradient const * getVector (bool force_private=false) const
 
SPGradientgetArray (bool force_private=false)
 Returns private mesh of given gradient (the gradient at the end of the href chain which has patches), optionally normalizing it.
 
void ensureVector ()
 Forces vector to be built, if not present (i.e.
 
void ensureArray ()
 Forces array (mesh) to be built, if not present (i.e.
 
void setSpread (SPGradientSpread spread)
 Set spread property of gradient and emit modified.
 
SPGradientSpread fetchSpread () const
 Returns the effective spread of given gradient (climbing up the refs chain if needed).
 
SPGradientUnits fetchUnits ()
 Returns the effective units of given gradient (climbing up the refs chain if needed).
 
void setSwatch (bool swatch=true)
 
void setPinned (bool pinned=true)
 
bool isPinned () const
 
bool isSolid () const
 
void repr_write_vector ()
 Writes the gradient's internal vector (whether from its own stops, or inherited from refs) into the gradient repr as svg:stop elements.
 
void repr_clear_vector ()
 Clears the gradient's svg:stop children from its repr.
 
cairo_pattern_tcreate_preview_pattern (double width)
 
Geom::Affine get_g2d_matrix (Geom::Affine const &ctm, Geom::Rect const &bbox) const
 Transforms to/from gradient position space in given environment.
 
Geom::Affine get_gs2d_matrix (Geom::Affine const &ctm, Geom::Rect const &bbox) const
 
void set_gs2d_matrix (Geom::Affine const &ctm, Geom::Rect const &bbox, Geom::Affine const &gs2d)
 
Geom::OptRect getAllItemsBox () const
 Return a visual bounding box that covers every item this gradient would paint added together.
 
- Public Member Functions inherited from SPPaintServer
 SPPaintServer ()
 
 ~SPPaintServer () override
 
int tag () const override
 
bool isSwatch () const
 
virtual bool isValid () const
 
virtual std::unique_ptr< Inkscape::DrawingPaintServercreate_drawing_paintserver ()
 
virtual Inkscape::DrawingPatternshow (Inkscape::Drawing &drawing, unsigned key, Geom::OptRect const &bbox)
 
virtual void hide (unsigned key)
 
virtual void setBBox (unsigned key, Geom::OptRect const &bbox)
 
- Public Member Functions inherited from SPObject
 SPObject ()
 Constructor, sets all attributes to default values.
 
 SPObject (SPObject const &)=delete
 
SPObjectoperator= (SPObject const &)=delete
 
 ~SPObject () override
 Destructor, frees the used memory and unreferences a potential successor of the object.
 
char const * getId () const
 Returns the objects current ID string.
 
void getIds (std::set< std::string > &ret) const
 Accumulate this id and all it's descendants ids.
 
std::string getUrl () const
 Get the id in a URL format.
 
Inkscape::XML::NodegetRepr ()
 Returns the XML representation of tree.
 
Inkscape::XML::Node const * getRepr () const
 Returns the XML representation of tree.
 
void releaseReferences ()
 Cleans up an SPObject, releasing its references and requesting that references to it be released.
 
sigc::connection connectRelease (sigc::slot< void(SPObject *)> slot)
 Connects to the release request signal.
 
bool isSiblingOf (SPObject const *object) const
 
virtual void getLinked (std::vector< SPObject * > &objects, LinkedObjectNature direction=LinkedObjectNature::ANY) const
 Get objects which are linked to this object as either a source or a target.
 
std::vector< SPObject * > getLinked (LinkedObjectNature direction=LinkedObjectNature::ANY) const
 Get objects which are linked, like above.
 
bool isAncestorOf (SPObject const *object) const
 True if object is non-NULL and this is some in/direct parent of object.
 
SPObject const * nearestCommonAncestor (SPObject const *object) const
 Returns youngest object being parent to this and object.
 
SPObject const * getTopAncestorNonLayer () const
 Returns ancestor non layer.
 
SPObjectgetNext ()
 
SPObjectgetPrev ()
 Returns previous object in sibling list or NULL.
 
bool hasChildren () const
 
SPObjectfirstChild ()
 
SPObject const * firstChild () const
 
SPObjectlastChild ()
 
SPObject const * lastChild () const
 
SPObjectnthChild (unsigned index)
 
SPObject const * nthChild (unsigned index) const
 
std::vector< SPObject * > childList (bool add_ref, Action action=ActionGeneral)
 Retrieves the children as a std vector object, optionally ref'ing the children in the process, if add_ref is specified.
 
std::vector< SPObject * > ancestorList (bool root_to_tip)
 Retrieves a list of ancestors of the object, as an easy to use vector.
 
SPObjectappendChildRepr (Inkscape::XML::Node *repr)
 Append repr as child of this object.
 
char const * label () const
 Gets the author-visible label property for the object or a default if no label is defined.
 
char const * defaultLabel () const
 Returns a default label property for this object.
 
void setLabel (char const *label)
 Sets the author-visible label for this object.
 
char * title () const
 Returns the title of this object, or NULL if there is none.
 
bool setTitle (char const *title, bool verbatim=false)
 Sets the title of this object.
 
char * desc () const
 Returns the description of this object, or NULL if there is none.
 
bool setDesc (char const *desc, bool verbatim=false)
 Sets the description of this object.
 
Glib::ustring getExportFilename () const
 Get and set the exportable filename on this object.
 
void setExportFilename (Glib::ustring filename)
 
Geom::Point getExportDpi () const
 Get and set the exported DPI for this objet, if available.
 
void setExportDpi (Geom::Point dpi)
 
CollectionPolicy collectionPolicy () const
 Set the policy under which this object will be orphan-collected.
 
void setCollectionPolicy (CollectionPolicy policy)
 Sets the orphan-collection policy in effect for this object.
 
void requestOrphanCollection ()
 Requests a later automatic call to collectOrphan().
 
void collectOrphan ()
 Unconditionally delete the object if it is not referenced.
 
void hrefObject (SPObject *owner=nullptr)
 Increase weak refcount.
 
void unhrefObject (SPObject *owner=nullptr)
 Decrease weak refcount.
 
bool isReferenced ()
 Check if object is referenced by any other object.
 
void deleteObject (bool propagate, bool propagate_descendants)
 Deletes an object, unparenting it from its parent.
 
void deleteObject (bool propagate=true)
 Deletes on object.
 
void cropToObject (SPObject *except)
 Removes all children except for the given object, it's children and it's ancesstors.
 
void cropToObjects (std::vector< SPObject * > except_objects)
 Removes objects which are not related to given list of objects.
 
void getObjectsExcept (std::vector< SPObject * > &objects, const std::vector< SPObject * > &except)
 Get all child objects except for any in the list.
 
void getLinkedRecursive (std::vector< SPObject * > &objects, LinkedObjectNature direction=LinkedObjectNature::ANY) const
 Grows the input list with all linked items recursively in both child nodes and links of links.
 
sigc::connection connectDelete (sigc::slot< void(SPObject *)> slot)
 Connects a slot to be called when an object is deleted.
 
sigc::connection connectPositionChanged (sigc::slot< void(SPObject *)> slot)
 
SPObjectsuccessor ()
 Returns the object which supercedes this one (if any).
 
void setSuccessor (SPObject *successor)
 Indicates that another object supercedes this one.
 
void setTmpSuccessor (SPObject *tmpsuccessor)
 Indicates that another object supercedes temporaty this one.
 
void unsetTmpSuccessor ()
 Unset object supercedes.
 
void fixTmpSuccessors ()
 Fix temporary successors in duple stamp.
 
Inkscape::XML::NodeupdateRepr (unsigned int flags=SP_OBJECT_WRITE_EXT)
 Updates the object's repr based on the object's state.
 
Inkscape::XML::NodeupdateRepr (Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, unsigned int flags)
 Updates the given repr based on the object's state.
 
void requestDisplayUpdate (unsigned int flags)
 Queues an deferred update of this object's display.
 
void updateDisplay (SPCtx *ctx, unsigned int flags)
 Updates the object's display immediately.
 
void requestModified (unsigned int flags)
 Requests that a modification notification signal be emitted later (e.g.
 
void emitModified (unsigned int flags)
 Emits the MODIFIED signal with the object's flags.
 
sigc::connection connectModified (sigc::slot< void(SPObject *, unsigned int)> slot)
 Connects to the modification notification signal.
 
void _sendDeleteSignalRecursive ()
 Sends the delete signal to all children of this object recursively.
 
void _updateTotalHRefCount (int increment)
 Adds increment to _total_hrefcount of object and its parents.
 
void _requireSVGVersion (unsigned major, unsigned minor)
 
void _requireSVGVersion (Inkscape::Version version)
 Lifts SVG version of all root objects to version.
 
void attach (SPObject *object, SPObject *prev)
 Put object into object tree, under parent, and behind prev; also update object's XML space.
 
void reorder (SPObject *obj, SPObject *prev)
 In list of object's children, move object behind prev.
 
void detach (SPObject *object)
 Remove object from parent's children, release and unref it.
 
SPObjectget_child_by_repr (Inkscape::XML::Node *repr)
 Return object's child whose node pointer equals repr.
 
void invoke_build (SPDocument *document, Inkscape::XML::Node *repr, unsigned int cloned)
 
int getIntAttribute (char const *key, int def)
 
unsigned getPosition ()
 
char const * getAttribute (char const *name) const
 
void appendChild (Inkscape::XML::Node *child)
 
void addChild (Inkscape::XML::Node *child, Inkscape::XML::Node *prev=nullptr)
 
void setKeyValue (SPAttr key, char const *value)
 Call virtual set() function of object.
 
void setAttribute (Inkscape::Util::const_char_ptr key, Inkscape::Util::const_char_ptr value)
 
void setAttributeDouble (Inkscape::Util::const_char_ptr key, double value)
 
void setAttributeOrRemoveIfEmpty (Inkscape::Util::const_char_ptr key, Inkscape::Util::const_char_ptr value)
 
void readAttr (char const *key)
 Read value of key attribute from XML node into object.
 
void readAttr (SPAttr keyid)
 
char const * getTagName () const
 
void removeAttribute (char const *key)
 
void setCSS (SPCSSAttr *css, char const *attr)
 
void changeCSS (SPCSSAttr *css, char const *attr)
 
bool storeAsDouble (char const *key, double *val) const
 
virtual void read_content ()
 
void recursivePrintTree (unsigned level=0)
 
void objectTrace (std::string const &, bool in=true, unsigned flags=0)
 
std::string generate_unique_id (char const *default_id=nullptr) const
 Generate a document-wide unique id for this object.
 

Static Public Member Functions

static void gradientRefModified (SPObject *href, unsigned int flags, SPGradient *gradient)
 
static void gradientRefChanged (SPObject *old_ref, SPObject *ref, SPGradient *gr)
 Gets called when the gradient is (re)attached to another gradient.
 

Public Attributes

Geom::Affine gradientTransform
 gradientTransform attribute
 
unsigned int gradientTransform_set: 1
 
SPGradientReferenceref
 Reference (href)
 
unsigned int state
 State in Inkscape gradient system.
 
SPGradientVector vector
 Linear and Radial Gradients.
 
sigc::connection modified_connection
 
SPMeshNodeArray array
 Mesh Gradients.
 
SPMeshNodeArray array_smoothed
 
- Public Attributes inherited from SPObject
unsigned int cloned: 1
 
SPObjectclone_original {nullptr}
 
unsigned int uflags: 16
 
unsigned int mflags: 16
 
SPIXmlSpace xml_space
 
Glib::ustring lang
 
unsigned int hrefcount {0}
 
unsigned int _total_hrefcount {0}
 
SPDocumentdocument {nullptr}
 
SPObjectparent {nullptr}
 
int refCount {1}
 
std::list< SPObject * > hrefList
 
SPStylestyle
 Represents the style properties, whether from presentation attributes, the style attribute, or inherited.
 
SPStylecontext_style
 Represents the style that should be used to resolve 'context-fill' and 'context-stroke'.
 
sigc::signal< void(SPObject *)> _release_signal
 
sigc::signal< void(SPObject *)> _delete_signal
 
sigc::signal< void(SPObject *)> _position_changed_signal
 
sigc::signal< void(SPObject *, unsigned int)> _modified_signal
 
SPObject_successor {nullptr}
 
SPObject_tmpsuccessor {nullptr}
 
CollectionPolicy _collection_policy {SPObject::COLLECT_WITH_PARENT}
 
char * _label {nullptr}
 
char * _default_label {nullptr}
 
ChildrenList children
 

Protected Member Functions

void build (SPDocument *document, Inkscape::XML::Node *repr) override
 Virtual build: set gradient attributes from its associated repr.
 
void release () override
 Virtual release of SPGradient members before destruction.
 
void modified (unsigned int flags) override
 Callback for modified event.
 
Inkscape::XML::Nodewrite (Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, unsigned int flags) override
 Write gradient attributes to repr.
 
void child_added (Inkscape::XML::Node *child, Inkscape::XML::Node *ref) override
 Callback for child_added event.
 
void remove_child (Inkscape::XML::Node *child) override
 Callback for remove_child event.
 
void set (SPAttr key, char const *value) override
 Set gradient attribute to value.
 
- Protected Member Functions inherited from SPObject
virtual void order_changed (Inkscape::XML::Node *child, Inkscape::XML::Node *old_repr, Inkscape::XML::Node *new_repr)
 
virtual void tag_name_changed (gchar const *oldname, gchar const *newname)
 
virtual void update (SPCtx *ctx, unsigned int flags)
 

Private Member Functions

bool invalidateVector ()
 Return true if change made.
 
bool invalidateArray ()
 Return true if change made.
 
void rebuildVector () const
 Creates normalized color vector.
 
void rebuildArray ()
 Creates normalized color mesh patch array.
 

Private Attributes

SPGradientUnits units
 gradientUnits attribute
 
unsigned int units_set: 1
 
SPGradientSpread spread
 spreadMethod attribute
 
unsigned int spread_set: 1
 
unsigned int has_stops: 1
 Gradient stops.
 
unsigned int has_patches: 1
 Gradient patches.
 
bool _pinned = false
 Pinned in swatches dialog.
 

Additional Inherited Members

- Public Types inherited from SPObject
enum  CollectionPolicy { COLLECT_WITH_PARENT , ALWAYS_COLLECT }
 
enum class  LinkedObjectNature { DEPENDENT = -1 , ANY = 0 , DEPENDENCY = 1 }
 
enum  Action { ActionGeneral , ActionBBox , ActionUpdate , ActionShow }
 
typedef Inkscape::Util::ForwardPointerIterator< SPObject, ParentIteratorStrategyParentIterator
 
typedef Inkscape::Util::ForwardPointerIterator< SPObject const, ParentIteratorStrategyConstParentIterator
 
using ChildrenList = boost::intrusive::list< SPObject, boost::intrusive::member_hook< SPObject, ListHook, &SPObject::_child_hook > >
 
- Protected Types inherited from SPObject
typedef boost::intrusive::list_member_hook ListHook
 
- Protected Attributes inherited from SPPaintServer
bool swatch = false
 
- Protected Attributes inherited from SPObject
ListHook _child_hook
 

Detailed Description

Gradient.

Implement spread, stops list

Todo:
fixme: Implement more here (Lauris)

Definition at line 84 of file sp-gradient.h.

Constructor & Destructor Documentation

◆ SPGradient()

◆ ~SPGradient()

SPGradient::~SPGradient ( )
overridedefault

Member Function Documentation

◆ build()

◆ child_added()

void SPGradient::child_added ( Inkscape::XML::Node child,
Inkscape::XML::Node ref 
)
overrideprotectedvirtual

Callback for child_added event.

Todo:
Fixme: should we schedule "modified" here?

Reimplemented from SPObject.

Definition at line 486 of file sp-gradient.cpp.

References SPObject::child_added(), SPObject::get_child_by_repr(), SPObject::getAttribute(), getStopCount(), has_patches, has_stops, invalidateVector(), ref, SPObject::requestModified(), and SPObject::setAttribute().

◆ create_preview_pattern()

cairo_pattern_t * SPGradient::create_preview_pattern ( double  width)

◆ ensureArray()

void SPGradient::ensureArray ( )

Forces array (mesh) to be built, if not present (i.e.

Forces the array to be built, if not present (i.e., changed).

changed)

Precondition
is<SPGradient>(gradient).

Definition at line 730 of file sp-gradient.cpp.

References array, SPMeshNodeArray::built, and rebuildArray().

Referenced by GrDrag::addDraggersMesh(), SPMeshGradient::create_drawing_paintserver(), modified(), and GrDrag::refreshDraggersMesh().

◆ ensureVector()

◆ fetchSpread()

SPGradientSpread SPGradient::fetchSpread ( ) const

Returns the effective spread of given gradient (climbing up the refs chain if needed).

Precondition
is<SPGradient>(gradient).

Definition at line 865 of file sp-gradient.cpp.

References chase_hrefs(), has_spread_set(), SP_GRADIENT_SPREAD_PAD, and spread.

Referenced by Inkscape::Extension::Internal::PdfBuilder::Document::get_radial_pattern(), gradientRefChanged(), and sp_item_gradient_get_spread().

◆ fetchUnits()

SPGradientUnits SPGradient::fetchUnits ( )

Returns the effective units of given gradient (climbing up the refs chain if needed).

Precondition
is<SPGradient>(gradient).

Definition at line 879 of file sp-gradient.cpp.

References chase_hrefs(), has_units_set(), SP_GRADIENT_UNITS_OBJECTBOUNDINGBOX, and units.

Referenced by gradientRefChanged().

◆ get_g2d_matrix()

Geom::Affine SPGradient::get_g2d_matrix ( Geom::Affine const &  ctm,
Geom::Rect const &  bbox 
) const

Transforms to/from gradient position space in given environment.

Definition at line 1088 of file sp-gradient.cpp.

References Geom::GenericRect< C >::dimensions(), getUnits(), Geom::GenericRect< C >::min(), and SP_GRADIENT_UNITS_OBJECTBOUNDINGBOX.

◆ get_gs2d_matrix()

Geom::Affine SPGradient::get_gs2d_matrix ( Geom::Affine const &  ctm,
Geom::Rect const &  bbox 
) const

◆ getAllItemsBox()

Geom::OptRect SPGradient::getAllItemsBox ( ) const

◆ getArray()

SPGradient * SPGradient::getArray ( bool  force_private = false)

Returns private mesh of given gradient (the gradient at the end of the href chain which has patches), optionally normalizing it.

Definition at line 851 of file sp-gradient.cpp.

References chase_hrefs(), and has_patchesFN().

Referenced by SPMeshNodeArray::read(), sp_gradient_convert_to_userspace(), and SPMeshNodeArray::write().

◆ getFirstStop()

◆ getGradientVector()

SPGradientVector const & SPGradient::getGradientVector ( ) const

◆ getSpread()

◆ getStopCount()

int SPGradient::getStopCount ( ) const

◆ getUnits()

◆ getVector() [1/2]

◆ getVector() [2/2]

SPGradient const * SPGradient::getVector ( bool  force_private = false) const
inline

Definition at line 165 of file sp-gradient.h.

References getVector().

◆ gradientRefChanged()

void SPGradient::gradientRefChanged ( SPObject old_ref,
SPObject ref,
SPGradient gr 
)
static

Gets called when the gradient is (re)attached to another gradient.

Todo:
Fixme: what should the flags (second) argument be? *‍/

Definition at line 457 of file sp-gradient.cpp.

References fetchSpread(), fetchUnits(), gradientRefModified(), modified_connection, ref, spread, spread_set, units, and units_set.

Referenced by SPGradient().

◆ gradientRefModified()

void SPGradient::gradientRefModified ( SPObject href,
unsigned int  flags,
SPGradient gradient 
)
static

Definition at line 950 of file sp-gradient.cpp.

References invalidateVector(), and SPObject::requestModified().

Referenced by gradientRefChanged().

◆ hasPatches()

bool SPGradient::hasPatches ( ) const

◆ hasStops()

◆ invalidateArray()

bool SPGradient::invalidateArray ( )
private

Return true if change made.

Definition at line 973 of file sp-gradient.cpp.

References array, and SPMeshNodeArray::built.

Referenced by modified().

◆ invalidateVector()

bool SPGradient::invalidateVector ( )
private

Return true if change made.

Definition at line 959 of file sp-gradient.cpp.

References SPGradientVector::built, SPGradientVector::stops, and vector.

Referenced by child_added(), gradientRefModified(), modified(), and remove_child().

◆ isAligned()

bool SPGradient::isAligned ( SPGradient that)

return true if this gradient is "aligned" to that gradient.

Aligned means that they have exactly the same coordinates and transform.

Parameters
that- A gradient to compare this to

Definition at line 163 of file sp-gradient.cpp.

References gradientTransform, and gradientTransform_set.

Referenced by isEquivalent().

◆ isEquivalent()

bool SPGradient::isEquivalent ( SPGradient that)

return true if this gradient is "equivalent" to that gradient.

Equivalent meaning they have the same stop count, same stop colors and same stop opacity

Parameters
that- A gradient to compare this to

Definition at line 114 of file sp-gradient.cpp.

References bs, SPStop::getColor(), getFirstStop(), SPStop::getNextStop(), getStopCount(), getVector(), hasStops(), isAligned(), Inkscape::Colors::Color::isClose(), SPPaintServer::isSwatch(), and SPStop::offset.

◆ isPinned()

bool SPGradient::isPinned ( ) const
inline

Definition at line 194 of file sp-gradient.h.

References _pinned.

Referenced by setPinned().

◆ isSolid()

◆ isSpreadSet()

bool SPGradient::isSpreadSet ( ) const

Definition at line 79 of file sp-gradient.cpp.

References spread_set.

Referenced by has_spread_set(), and Inkscape::UI::Widget::GradientEditor::set_gradient().

◆ isUnitsSet()

bool SPGradient::isUnitsSet ( ) const

All Gradients.

Definition at line 69 of file sp-gradient.cpp.

References units_set.

Referenced by has_units_set().

◆ modified()

void SPGradient::modified ( unsigned int  flags)
overrideprotectedvirtual

Callback for modified event.

Reimplemented from SPObject.

Definition at line 554 of file sp-gradient.cpp.

References child, SPObject::children, ensureArray(), ensureVector(), invalidateArray(), invalidateVector(), SPObject::objectTrace(), sp_object_ref(), and sp_object_unref().

Referenced by set().

◆ rebuildArray()

void SPGradient::rebuildArray ( )
private

Creates normalized color mesh patch array.

Definition at line 1074 of file sp-gradient.cpp.

References array, has_patches, SPMeshNodeArray::patch_columns(), and SPMeshNodeArray::read().

Referenced by ensureArray().

◆ rebuildVector()

void SPGradient::rebuildVector ( ) const
private

◆ release()

void SPGradient::release ( )
overrideprotectedvirtual

Virtual release of SPGradient members before destruction.

Reimplemented from SPObject.

Definition at line 317 of file sp-gradient.cpp.

References Inkscape::URIReference::detach(), SPObject::document, SPObject::getId(), modified_connection, ref, SPObject::release(), and SPDocument::removeResource().

◆ remove_child()

void SPGradient::remove_child ( Inkscape::XML::Node child)
overrideprotectedvirtual

◆ repr_clear_vector()

void SPGradient::repr_clear_vector ( )

Clears the gradient's svg:stop children from its repr.

Todo:
fixme: This should work, unless we make gradient into generic group.

Definition at line 892 of file sp-gradient.cpp.

References child, Inkscape::XML::Node::firstChild(), SPObject::getRepr(), SPObject::repr, and sp_repr_unparent().

Referenced by repr_write_vector().

◆ repr_write_vector()

void SPGradient::repr_write_vector ( )

◆ set()

◆ set_gs2d_matrix()

◆ setPinned()

void SPGradient::setPinned ( bool  pinned = true)

◆ setSpread()

void SPGradient::setSpread ( SPGradientSpread  spread)

Set spread property of gradient and emit modified.

Definition at line 753 of file sp-gradient.cpp.

References SPObject::requestModified(), spread, and spread_set.

Referenced by Inkscape::UI::Widget::PaintSelector::pushAttrsToGradient(), and Inkscape::UI::Widget::GradientEditor::set_repeat_mode().

◆ setSwatch()

◆ setUnits()

void SPGradient::setUnits ( SPGradientUnits  units)

Set units property of gradient and emit modified.

Definition at line 741 of file sp-gradient.cpp.

References SPObject::requestModified(), units, and units_set.

Referenced by Inkscape::UI::Widget::PaintSelector::pushAttrsToGradient().

◆ tag()

int SPGradient::tag ( ) const
inlineoverridevirtual

Reimplemented from SPObject.

Reimplemented in SPLinearGradient, SPMeshGradient, and SPRadialGradient.

Definition at line 90 of file sp-gradient.h.

References tag_of.

◆ write()

Member Data Documentation

◆ _pinned

bool SPGradient::_pinned = false
private

Pinned in swatches dialog.

Definition at line 114 of file sp-gradient.h.

Referenced by isPinned(), and set().

◆ array

◆ array_smoothed

SPMeshNodeArray SPGradient::array_smoothed

Definition at line 143 of file sp-gradient.h.

Referenced by SPMeshGradient::create_drawing_paintserver().

◆ gradientTransform

◆ gradientTransform_set

◆ has_patches

unsigned int SPGradient::has_patches
private

Gradient patches.

Definition at line 111 of file sp-gradient.h.

Referenced by build(), child_added(), hasPatches(), rebuildArray(), remove_child(), and SPGradient().

◆ has_stops

unsigned int SPGradient::has_stops
private

Gradient stops.

Definition at line 108 of file sp-gradient.h.

Referenced by build(), child_added(), hasStops(), remove_child(), and SPGradient().

◆ modified_connection

sigc::connection SPGradient::modified_connection

Definition at line 129 of file sp-gradient.h.

Referenced by gradientRefChanged(), and release().

◆ ref

◆ spread

SPGradientSpread SPGradient::spread
private

spreadMethod attribute

Definition at line 104 of file sp-gradient.h.

Referenced by fetchSpread(), getSpread(), gradientRefChanged(), set(), setSpread(), SPGradient(), and write().

◆ spread_set

unsigned int SPGradient::spread_set
private

Definition at line 105 of file sp-gradient.h.

Referenced by gradientRefChanged(), isSpreadSet(), set(), setSpread(), SPGradient(), and write().

◆ state

unsigned int SPGradient::state

◆ units

SPGradientUnits SPGradient::units
private

gradientUnits attribute

Definition at line 94 of file sp-gradient.h.

Referenced by fetchUnits(), getUnits(), gradientRefChanged(), set(), setUnits(), SPGradient(), and write().

◆ units_set

unsigned int SPGradient::units_set
private

Definition at line 95 of file sp-gradient.h.

Referenced by gradientRefChanged(), isUnitsSet(), set(), setUnits(), SPGradient(), and write().

◆ vector


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