Logo Search packages:      
Sourcecode: inkscape version File versions  Download package

SPOffset Struct Reference

#include <sp-offset.h>

Inheritance diagram for SPOffset:

SPItem SPObject

List of all members.

Detailed Description

SPOffset class.

An offset is defined by curve and radius. The original curve is kept as a path in a sodipodi:original attribute. It's not possible to change the original curve.

SPOffset is a derivative of SPShape, much like the SPSpiral or SPRect. The goal is to have a source shape (= originalPath), an offset (= radius) and compute the offset of the source by the radius. To get it to work, one needs to know what the source is and what the radius is, and how it's stored in the xml representation. The object itself is a "path" element, to get lots of shape functionality for free. The source is the easy part: it's stored in a "inkscape:original" attribute in the path. In case of "linked" offset, as they've been dubbed, there is an additional "inkscape:href" that contains the id of an element of the svg. When built, the object will attach a listener vector to that object and rebuild the "inkscape:original" whenever the href'd object changes. This is of course grossly inefficient, and also does not react to changes to the href'd during context stuff (like changing the shape of a star by dragging control points) unless the path of that object is changed during the context (seems to be the case for SPEllipse). The computation of the offset is done in sp_offset_set_shape(), a function that is called whenever a change occurs to the offset (change of source or change of radius). just like the sp-star and other, this path derivative can make control points, or more precisely one control point, that's enough to define the radius (look in object-edit).

Definition at line 59 of file sp-offset.h.

Public Types

enum  Action { ActionGeneral, ActionBBox, ActionUpdate, ActionShow }
< SPObject const,
< SPObject const,
< SPObject,
< SPObject,

Public Member Functions

void _requireSVGVersion (Inkscape::Version version)
void _requireSVGVersion (unsigned major, unsigned minor)
void _sendDeleteSignalRecursive ()
void _updateTotalHRefCount (int increment)
SPObjectappendChildRepr (Inkscape::XML::Node *repr)
GSList * childList (bool add_ref, Action action=ActionGeneral)
 Retrieves children as a GSList.
CollectionPolicy collectionPolicy () const
 Set the policy under which this object will be orphan-collected.
void collectOrphan ()
 Unconditionally delete the object if it is not referenced.
sigc::connection connectDelete (sigc::slot< void, SPObject * > slot)
 Connects a slot to be called when an object is deleted.
sigc::connection connectModified (sigc::slot< void, SPObject *, unsigned int > slot)
 Connects to the modification notification signal.
sigc::connection connectPositionChanged (sigc::slot< void, SPObject * > slot)
sigc::connection connectRelease (sigc::slot< void, SPObject * > slot)
 connects to the release request signal
sigc::connection connectTransformed (sigc::slot< void, Geom::Matrix const *, SPItem * > slot)
gchar const * defaultLabel () const
 Returns a default label for this object.
void deleteObject (bool propagate=true)
 Deletes on object.
void deleteObject (bool propagate, bool propagate_descendants)
 Deletes an object.
gchar * desc () const
void emitModified (unsigned int flags)
 Emits a modification notification signal.
SPObject const * firstChild () const
SPObjectfirstChild ()
Geom::OptRect getBounds (Geom::Matrix const &transform, BBoxType type=APPROXIMATE_BBOX, unsigned int dkey=0) const
Geom::Point getCenter () const
gchar const * getId () const
SPObjectgetNext ()
SPObjectgetPrev ()
Geom::Matrix getRelativeTransform (SPObject const *obj) const
bool hasChildren () const
void init ()
bool isAncestorOf (SPObject const *object) const
bool isCenterSet ()
bool isEvaluated () const
bool isExplicitlyHidden () const
bool isHidden (unsigned display_key) const
bool isHidden () const
bool isLocked () const
bool isReferenced ()
 Check if object is referenced by any other object.
bool isSiblingOf (SPObject const *object) const
bool isVisibleAndUnlocked (unsigned display_key) const
bool isVisibleAndUnlocked () const
gchar const * label () const
 Gets the author-visible label for this object.
SPObject const * lastChild () const
SPObjectlastChild ()
void lowerOne ()
void lowerToBottom ()
SPObject const * nearestCommonAncestor (SPObject const *object) const
void raiseOne ()
void raiseToTop ()
void releaseReferences ()
 cleans up an SPObject, releasing its references and requesting that references to it be released
void replacePathEffects (std::vector< LivePathEffectObject const * > const old_lpeobjs, std::vector< LivePathEffectObject const * > const new_lpeobjs)
void requestDisplayUpdate (unsigned int flags)
 Queues an deferred update of this object's display.
void requestModified (unsigned int flags)
 Requests that a modification notification signal be emitted later (e.g. during the idle loop).
void requestOrphanCollection ()
 Requests a later automatic call to collectOrphan().
void resetEvaluated ()
void setCenter (Geom::Point object_centre)
void setCollectionPolicy (CollectionPolicy policy)
 Sets the orphan-collection policy in effect for this object.
bool setDesc (gchar const *desc, bool verbatim=false)
void setEvaluated (bool visible)
void setExplicitlyHidden (bool val)
void setHidden (bool hidden)
void setLabel (gchar const *label)
 Sets the author-visible label for this object.
void setLocked (bool lock)
void setSuccessor (SPObject *successor)
 Indicates that another object supercedes this one.
bool setTitle (gchar const *title, bool verbatim=false)
SPObjectsuccessor ()
 Returns the object which supercedes this one (if any).
gchar * title () const
void unsetCenter ()
void updateDisplay (SPCtx *ctx, unsigned int flags)
 Updates the object's display immediately.
Inkscape::XML::NodeupdateRepr (Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, unsigned int flags)
 Updates the given repr based on the object's state.
Inkscape::XML::NodeupdateRepr (unsigned int flags=SP_OBJECT_WRITE_EXT)
 Updates the object's repr based on the object's state.

Public Attributes

sigc::connection _changed_connection
sigc::connection _clip_ref_connection
CollectionPolicy _collection_policy
gchar * _default_label
sigc::connection _delete_connection
sigc::signal< void, SPObject * > _delete_signal
gchar * _label
sigc::connection _mask_ref_connection
sigc::connection _modified_connection
sigc::signal< void, SPObject
*, unsigned int > 
sigc::signal< void, SPObject * > _position_changed_signal
sigc::signal< void, SPObject * > _release_signal
unsigned int _total_hrefcount
sigc::connection _transformed_connection
sigc::signal< void,
Geom::Matrix const *, SPItem * > 
SPAvoidRef * avoidRef
SPClipPathReference * clip_ref
unsigned int cloned: 1
std::vector< SPGuideConstraint > constraints
Inkscape::LivePathEffect::LPEObjectReference * current_path_effect
SPCurve * curve
unsigned int hrefcount
bool isUpdating
Geom::Point knot
bool knotSet
 for interactive setting of the radius
< Inkscape::Display::TemporaryItem * > 
std::list< sigc::connection > * lpe_modified_connection_list
SPObjectmarker [SP_MARKER_LOC_QTY]
SPMaskReference * mask_ref
unsigned int mflags: 8
sigc::connection modified_connect [SP_MARKER_LOC_QTY]
char * original
 SVG description of the source path.
void * originalPath
 will be a livarot Path, just don't declare it here to please the gcc linker
PathEffectList * path_effect_list
int path_effects_enabled
float rad
 offset radius
sigc::connection release_connect [SP_MARKER_LOC_QTY]
unsigned int sensitive: 1
bool sourceDirty
gchar * sourceHref
SPUseReference * sourceRef
 the repr associated with that id
unsigned int stop_paint: 1
Geom::Matrix transform
double transform_center_x
double transform_center_y
unsigned int uflags: 8
SPIXmlSpace xml_space

The documentation for this struct was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index