Inkscape
Vector Graphics Editor
|
#include <box3d.h>
Public Member Functions | |
SPBox3D () | |
~SPBox3D () override | |
int | tag () const override |
void | build (SPDocument *document, Inkscape::XML::Node *repr) override |
void | release () override |
void | set (SPAttr key, char const *value) override |
void | update (SPCtx *ctx, unsigned int flags) override |
Inkscape::XML::Node * | write (Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, unsigned int flags) override |
virtual const char * | display_name () |
Geom::Affine | set_transform (Geom::Affine const &transform) override |
void | convert_to_guides () const override |
const char * | displayName () const override |
The item's type name as a translated human string. | |
char * | description () const override |
void | position_set () |
Geom::Point | get_corner_screen (unsigned int id, bool item_coords=true) const |
Proj::Pt3 | get_proj_center () |
Geom::Point | get_center_screen () |
void | set_corner (unsigned int id, Geom::Point const &new_pos, Box3D::Axis movement, bool constrained) |
void | set_center (Geom::Point const &new_pos, Geom::Point const &old_pos, Box3D::Axis movement, bool constrained) |
void | corners_for_PLs (Proj::Axis axis, Geom::Point &corner1, Geom::Point &corner2, Geom::Point &corner3, Geom::Point &corner4) const |
bool | recompute_z_orders () |
void | set_z_orders () |
int | pt_lies_in_PL_sector (Geom::Point const &pt, int id1, int id2, Box3D::Axis axis) const |
int | VP_lies_in_PL_sector (Proj::Axis vpdir, int id1, int id2, Box3D::Axis axis) const |
void | relabel_corners () |
void | check_for_swapped_coords () |
Persp3D * | get_perspective () const |
void | switch_perspectives (Persp3D *old_persp, Persp3D *new_persp, bool recompute_corners=false) |
SPGroup * | convert_to_group () |
![]() | |
SPGroup () | |
~SPGroup () override | |
int | tag () const override |
bool | isLayer () const |
LayerMode | layerMode () const |
void | setLayerMode (LayerMode mode) |
bool | insertBottom () const |
void | setInsertBottom (bool insertbottom) |
LayerMode | effectiveLayerMode (unsigned int display_key) const |
LayerMode | layerDisplayMode (unsigned int display_key) const |
void | setLayerDisplayMode (unsigned int display_key, LayerMode mode) |
void | translateChildItems (Geom::Translate const &tr) |
void | scaleChildItemsRec (Geom::Scale const &sc, Geom::Point const &p, bool noRecurse) |
int | getItemCount () const |
virtual void | _showChildren (Inkscape::Drawing &drawing, Inkscape::DrawingItem *ai, unsigned int key, unsigned int flags) |
std::vector< SPItem * > | item_list () |
void | build (SPDocument *document, Inkscape::XML::Node *repr) override |
void | release () override |
void | child_added (Inkscape::XML::Node *child, Inkscape::XML::Node *ref) override |
void | remove_child (Inkscape::XML::Node *child) override |
void | order_changed (Inkscape::XML::Node *child, Inkscape::XML::Node *old_ref, Inkscape::XML::Node *new_ref) override |
void | update (SPCtx *ctx, unsigned int flags) override |
void | modified (unsigned int flags) override |
void | set (SPAttr key, char const *value) override |
Inkscape::XML::Node * | write (Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, unsigned int flags) override |
Geom::OptRect | bbox (Geom::Affine const &transform, SPItem::BBoxType bboxtype) const override |
void | print (SPPrintContext *ctx) override |
const char * | typeName () const override |
The item's type name, not node tag name. | |
const char * | displayName () const override |
The item's type name as a translated human string. | |
char * | description () const override |
Inkscape::DrawingItem * | show (Inkscape::Drawing &drawing, unsigned int key, unsigned int flags) override |
void | hide (unsigned int key) override |
void | snappoints (std::vector< Inkscape::SnapCandidatePoint > &p, Inkscape::SnapPreferences const *snapprefs) const override |
void | update_patheffect (bool write) override |
Inkscape::Colors::Color | highlight_color () const override |
Generate a highlight colour if one isn't set and return it. | |
void | removeTransformsRecursively (SPObject const *root) override |
![]() | |
SPLPEItem () | |
~SPLPEItem () override | |
int | tag () const override |
void | replacePathEffects (std::vector< LivePathEffectObject const * > const &old_lpeobjs, std::vector< LivePathEffectObject const * > const &new_lpeobjs) |
Writes a new "inkscape:path-effect" string to xml, where the old_lpeobjects are substituted by the new ones. | |
void | build (SPDocument *doc, Inkscape::XML::Node *repr) override |
void | release () override |
void | set (SPAttr key, char const *value) override |
void | update (SPCtx *ctx, unsigned int flags) override |
void | modified (unsigned int flags) override |
void | child_added (Inkscape::XML::Node *child, Inkscape::XML::Node *ref) override |
void | remove_child (Inkscape::XML::Node *child) override |
Inkscape::XML::Node * | write (Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, unsigned int flags) override |
bool | optimizeTransforms () |
returns false when LPE write unoptimiced | |
void | notifyTransform (Geom::Affine const &postmul) |
notify tranbsform applied to a LPE | |
bool | performPathEffect (Geom::PathVector &curve, SPShape *current, bool is_clip_or_mask=false) |
returns true when LPE was successful. | |
bool | performOnePathEffect (Geom::PathVector &curve, SPShape *current, Inkscape::LivePathEffect::Effect *lpe, bool is_clip_or_mask=false) |
returns true when LPE was successful. | |
bool | pathEffectsEnabled () const |
bool | hasPathEffect () const |
bool | hasPathEffectOfType (int const type, bool is_ready=true) const |
bool | hasPathEffectOfTypeRecursive (int const type, bool is_ready=true) const |
bool | hasPathEffectRecursive () const |
SPLPEItem const * | getTopPathEffect () const |
returns top most LPE item with LPE | |
bool | hasPathEffectOnClipOrMask (SPLPEItem *shape) const |
returns true when any LPE apply to clip or mask. | |
bool | hasPathEffectOnClipOrMaskRecursive (SPLPEItem *shape) const |
returns true when any LPE apply to clip or mask. | |
std::size_t | getLPEIndex (Inkscape::LivePathEffect::Effect *lpe) const |
std::size_t | countLPEOfType (int const type, bool inc_hidden=true, bool is_ready=true) const |
std::size_t | getLPEReferenceIndex (PathEffectSharedPtr const &lperef) const |
Inkscape::LivePathEffect::Effect * | getFirstPathEffectOfType (int type) |
Inkscape::LivePathEffect::Effect const * | getFirstPathEffectOfType (int type) const |
std::vector< Inkscape::LivePathEffect::Effect * > | getPathEffectsOfType (int type) |
std::vector< Inkscape::LivePathEffect::Effect const * > | getPathEffectsOfType (int type) const |
std::vector< Inkscape::LivePathEffect::Effect * > | getPathEffects () |
std::vector< Inkscape::LivePathEffect::Effect const * > | getPathEffects () const |
std::vector< SPObject * > | get_satellites (bool force=true, bool recursive=false, bool onchilds=false) |
bool | isOnClipboard () |
The lpeitem is on clipboard. | |
bool | isOnSymbol () const |
bool | hasBrokenPathEffect () const |
used for shapes so they can see if they should also disable shape calculation and read from d= | |
PathEffectList | getEffectList () |
PathEffectList const | getEffectList () const |
void | duplicateCurrentPathEffect () |
void | downCurrentPathEffect () |
void | upCurrentPathEffect () |
void | removePathEffect (Inkscape::LivePathEffect::Effect *lpe, bool keep_paths) |
void | movePathEffect (gint origin, gint dest, bool select_moved=false) |
SPLPEItem * | flattenCurrentPathEffect () |
PathEffectSharedPtr | getCurrentLPEReference () |
Inkscape::LivePathEffect::Effect * | getCurrentLPE () |
PathEffectSharedPtr | getPrevLPEReference (PathEffectSharedPtr const &lperef) |
Inkscape::LivePathEffect::Effect * | getPrevLPE (Inkscape::LivePathEffect::Effect *lpe) |
PathEffectSharedPtr | getNextLPEReference (PathEffectSharedPtr const &lperef) |
Inkscape::LivePathEffect::Effect * | getNextLPE (Inkscape::LivePathEffect::Effect *lpe) |
PathEffectSharedPtr | getLastLPEReference () |
Inkscape::LivePathEffect::Effect * | getLastLPE () |
bool | setCurrentPathEffect (PathEffectSharedPtr const &lperef) |
bool | setCurrentPathEffect (LivePathEffectObject const *lpeobj) |
SPLPEItem * | removeCurrentPathEffect (bool keep_paths) |
If keep_path is true, the item should not be updated, effectively 'flattening' the LPE. | |
SPLPEItem * | removeAllPathEffects (bool keep_paths, bool recursive=false) |
If keep_path is true, the item should not be updated, effectively 'flattening' the LPE. | |
void | addPathEffect (std::string value, bool reset) |
void | addPathEffect (LivePathEffectObject *new_lpeobj) |
void | resetClipPathAndMaskLPE (bool fromrecurse=false) |
void | applyToMask (SPItem *to, Inkscape::LivePathEffect::Effect *lpe=nullptr) |
void | applyToClipPath (SPItem *to, Inkscape::LivePathEffect::Effect *lpe=nullptr) |
void | applyToClipPathOrMask (SPItem *clip_mask, SPItem *to, Inkscape::LivePathEffect::Effect *lpe=nullptr) |
bool | forkPathEffectsIfNecessary (unsigned int nr_of_allowed_users=1, bool recursive=true, bool force=false) |
Check all effects in the stack if they are used by other items, and fork them if so. | |
void | editNextParamOncanvas (SPDesktop *dt) |
void | update_satellites (bool recursive=true) |
![]() | |
SPItem () | |
~SPItem () override | |
SPClipPath * | getClipObject () const |
SPMask * | getMaskObject () const |
SPClipPathReference & | getClipRef () |
SPMaskReference & | getMaskRef () |
std::optional< Geom::PathVector > | getClipPathVector () const |
Return the path vector of the clipping region. | |
std::optional< Geom::PathVector > | getClipPathVector (SPItem const *root) const |
Return the path vector of the clipping region, combined with the clipping regions of all groups containing this object up to and including root. | |
SPText const * | getClipTextObject () const |
Return the text object, IF and only if this item is clipped by a single SPText object. | |
SPAvoidRef & | getAvoidRef () |
bool | isLocked () const |
void | setLocked (bool lock, bool recursive=false) |
bool | isHidden () const |
void | setHidden (bool hidden) |
bool | isSensitive () const |
void | setHighlight (Inkscape::Colors::Color color) |
bool | isHighlightSet () const |
bool | isEvaluated () const |
void | setEvaluated (bool visible) |
void | resetEvaluated () |
bool | unoptimized () |
bool | isHidden (unsigned display_key) const |
bool | isExplicitlyHidden () const |
Returns something suitable for the ‘Hide’ checkbox in the Object Properties dialog box. | |
void | setExplicitlyHidden (bool val) |
Sets the display CSS property to ‘hidden’ if val is true, otherwise makes it unset. | |
void | setCenter (Geom::Point const &object_centre) |
Sets the transform_center_x and transform_center_y properties to retain the rotation center. | |
bool | updateCenterIfSet (Geom::Point const ¢er) |
void | unsetCenter () |
bool | isCenterSet () const |
Geom::Point | getCenter (bool ensure_uptodate=true) const |
void | scaleCenter (Geom::Scale const &sc) |
bool | isVisibleAndUnlocked () const |
bool | isVisibleAndUnlocked (unsigned display_key) const |
Geom::Affine | getRelativeTransform (SPObject const *obj) const |
bool | raiseOne () |
bool | lowerOne () |
void | raiseToTop () |
void | lowerToBottom () |
SPGroup * | getParentGroup () const |
Return the parent, only if it's a group object. | |
void | moveTo (SPItem *target, bool intoafter) |
Move this SPItem into or after another SPItem in the doc. | |
sigc::connection | connectTransformed (sigc::slot< void(Geom::Affine const *, SPItem *)> slot) |
Geom::OptRect | geometricBounds (Geom::Affine const &transform=Geom::identity()) const |
Get item's geometric bounding box in this item's coordinate system. | |
Geom::OptRect | visualBounds (Geom::Affine const &transform=Geom::identity(), bool wfilter=true, bool wclip=true, bool wmask=true) const |
Get item's visual bounding box in this item's coordinate system. | |
Geom::OptRect | bounds (BBoxType type, Geom::Affine const &transform=Geom::identity()) const |
Geom::OptRect | documentGeometricBounds () const |
Get item's geometric bbox in document coordinate system. | |
Geom::OptRect | documentVisualBounds () const |
Get item's visual bbox in document coordinate system. | |
Geom::OptRect | documentBounds (BBoxType type) const |
Geom::OptRect | documentPreferredBounds () const |
virtual std::optional< Geom::PathVector > | documentExactBounds () const |
Get an exact geometric shape representing the visual bounds of the item in the document coordinates. | |
Geom::OptRect | desktopGeometricBounds () const |
Get item's geometric bbox in desktop coordinate system. | |
Geom::OptRect | desktopVisualBounds () const |
Get item's visual bbox in desktop coordinate system. | |
Geom::OptRect | desktopPreferredBounds () const |
Geom::OptRect | desktopBounds (BBoxType type) const |
unsigned int | pos_in_parent () const |
char * | detailedDescription () const |
Returns a string suitable for status bar, formatted in pango markup language. | |
bool | isFiltered () const |
Returns true if the item is filtered, false otherwise. | |
SPObject * | isInMask () const |
SPObject * | isInClipPath () const |
void | invoke_print (SPPrintContext *ctx) |
Inkscape::DrawingItem * | invoke_show (Inkscape::Drawing &drawing, unsigned int key, unsigned int flags) |
void | invoke_hide (unsigned int key) |
void | invoke_hide_except (unsigned key, const std::vector< SPItem const * > &to_keep) |
Invoke hide on all non-group items, except for the list of items to keep. | |
void | getSnappoints (std::vector< Inkscape::SnapCandidatePoint > &p, Inkscape::SnapPreferences const *snapprefs=nullptr) const |
void | adjust_pattern (Geom::Affine const &postmul, bool set=false, PaintServerTransform=TRANSFORM_BOTH) |
void | adjust_hatch (Geom::Affine const &postmul, bool set=false, PaintServerTransform=TRANSFORM_BOTH) |
void | adjust_gradient (Geom::Affine const &postmul, bool set=false) |
void | adjust_clip (Geom::Affine const &postmul, bool set=false) |
void | remove_clip_transforms () |
void | adjust_stroke (double ex) |
void | adjust_stroke_width_recursive (double ex) |
Recursively scale stroke width in item and its children by expansion. | |
void | freeze_stroke_width_recursive (bool freeze) |
void | adjust_paint_recursive (Geom::Affine advertized_transform, Geom::Affine t_ancestors, PaintServerType type=GRADIENT) |
Recursively compensate pattern or gradient transform. | |
bool | collidesWith (Geom::PathVector const &shape) const |
Checks for visual collision with another item. | |
bool | collidesWith (SPItem const &other) const |
void | doWriteTransform (Geom::Affine const &transform, Geom::Affine const *adv=nullptr, bool compensate=true) |
Set a new transform on an object. | |
void | set_item_transform (Geom::Affine const &transform_matrix) |
Sets item private transform (not propagated to repr), without compensating stroke widths, gradients, patterns as sp_item_write_transform does. | |
Inkscape::DrawingItem * | get_arenaitem (unsigned key) const |
Return the arenaitem corresponding to the given item in the display with the given key. | |
Geom::Affine | i2doc_affine () const |
Returns the accumulated transformation of the item and all its ancestors, including root's viewport. | |
Geom::Affine | i2dt_affine () const |
Returns the transformation from item to desktop coords. | |
void | set_i2d_affine (Geom::Affine const &transform) |
Geom::Affine | dt2i_affine () const |
Returns the transformation from desktop to item coords. | |
bool | isExpanded () const |
void | setExpanded (bool expand) |
void | rotate_rel (Geom::Rotate const &rotation) |
void | scale_rel (Geom::Scale const &scale) |
void | skew_rel (double skewX, double skewY) |
void | move_rel (Geom::Translate const &tr) |
![]() | |
SPObject () | |
Constructor, sets all attributes to default values. | |
SPObject (SPObject const &)=delete | |
SPObject & | operator= (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::Node * | getRepr () |
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. | |
SPObject * | getNext () |
SPObject * | getPrev () |
Returns previous object in sibling list or NULL. | |
bool | hasChildren () const |
SPObject * | firstChild () |
SPObject const * | firstChild () const |
SPObject * | lastChild () |
SPObject const * | lastChild () const |
SPObject * | nthChild (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. | |
SPObject * | appendChildRepr (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) |
SPObject * | successor () |
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::Node * | updateRepr (unsigned int flags=SP_OBJECT_WRITE_EXT) |
Updates the object's repr based on the object's state. | |
Inkscape::XML::Node * | updateRepr (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. | |
SPObject * | get_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 SPBox3D * | createBox3D (SPItem *parent) |
Create a SPBox3D and append it to the parent. | |
static std::list< SPBox3D * > | extract_boxes (SPObject *obj) |
![]() | |
static std::vector< SPItem * > | get_expanded (std::vector< SPItem * > const &items) |
Return the result of recursively ungrouping all groups in items. | |
![]() | |
static unsigned int | display_key_new (unsigned numkeys) |
Allocates unique integer keys. | |
static unsigned | ensure_key (Inkscape::DrawingItem *di) |
Ensures that a drawing item's key is the first of a block of ITEM_KEY_SIZE keys, assigning it such a key if necessary. | |
SPBox3D::SPBox3D | ( | ) |
Definition at line 41 of file box3d.cpp.
References my_counter, Box3D::NONE, persp_href, persp_ref, swapped, and z_orders.
|
overridedefault |
|
overridevirtual |
Reimplemented from SPObject.
Definition at line 56 of file box3d.cpp.
References box3d_ref_changed(), SPGroup::build(), Inkscape::URIReference::changedSignal(), counter, SPObject::document, INKSCAPE_BOX3D_CORNER0, INKSCAPE_BOX3D_CORNER7, INKSCAPE_BOX3D_PERSPECTIVE_ID, my_counter, persp_ref, SPObject::readAttr(), SPObject::repr, and z_orders.
void SPBox3D::check_for_swapped_coords | ( | ) |
Definition at line 1194 of file box3d.cpp.
References box3d_check_for_swapped_coords(), box3d_exchange_coords(), Proj::X, Proj::Y, and Proj::Z.
Referenced by Inkscape::UI::Tools::Box3dTool::drag().
SPGroup * SPBox3D::convert_to_group | ( | ) |
Definition at line 1252 of file box3d.cpp.
References SPObject::appendChild(), Inkscape::XML::Node::appendChild(), SPObject::children, Inkscape::XML::Document::createElement(), SPObject::deleteObject(), SPObject::document, SPObject::getAttribute(), SPDocument::getObjectByRepr(), SPObject::getPosition(), SPDocument::getReprDoc(), parent, SPObject::repr, Inkscape::XML::Node::setAttribute(), Inkscape::XML::Node::setAttributeOrRemoveIfEmpty(), Inkscape::XML::Node::setPosition(), and SPObject::style.
|
overridevirtual |
Reimplemented from SPItem.
Definition at line 1311 of file box3d.cpp.
References box3d_push_back_corner_pair(), convert_to_guides(), SPObject::document, Inkscape::Preferences::get(), Inkscape::Preferences::getBool(), and sp_guide_pt_pairs_to_guides().
Referenced by convert_to_guides().
void SPBox3D::corners_for_PLs | ( | Proj::Axis | axis, |
Geom::Point & | corner1, | ||
Geom::Point & | corner2, | ||
Geom::Point & | corner3, | ||
Geom::Point & | corner4 | ||
) | const |
Definition at line 536 of file box3d.cpp.
References get_perspective(), orig_corner0, orig_corner7, Persp3D::perspective_impl, Proj::X, Proj::Y, and Proj::Z.
Referenced by Box3D::VPDrag::drawLinesForFace().
Create a SPBox3D and append it to the parent.
Definition at line 419 of file box3d.cpp.
References Inkscape::XML::Document::createElement(), Inkscape::XML::Node::document(), parent, SPObject::repr, and Inkscape::XML::Node::setAttribute().
Referenced by Inkscape::UI::Tools::Box3dTool::drag().
|
overridevirtual |
|
overridevirtual |
Definition at line 1214 of file box3d.cpp.
References box3d_extract_boxes_rec().
Referenced by Inkscape::ObjectSet::_add3DBoxesRecursively(), and Inkscape::ObjectSet::_remove3DBoxesRecursively().
Geom::Point SPBox3D::get_center_screen | ( | ) |
Definition at line 319 of file box3d.cpp.
References get_perspective(), get_proj_center(), SPItem::i2dt_affine(), Geom::infinity(), Geom::Affine::inverse(), and Persp3D::perspective_impl.
Geom::Point SPBox3D::get_corner_screen | ( | unsigned int | id, |
bool | item_coords = true |
||
) | const |
Definition at line 295 of file box3d.cpp.
References box3d_get_proj_corner(), get_perspective(), SPItem::i2dt_affine(), Geom::infinity(), Geom::Affine::inverse(), and Persp3D::perspective_impl.
Referenced by box3d_push_back_corner_pair(), box3d_XY_axes_are_swapped(), pt_lies_in_PL_sector(), recompute_z_orders(), and switch_perspectives().
Persp3D * SPBox3D::get_perspective | ( | ) | const |
Definition at line 1221 of file box3d.cpp.
References Persp3DReference::getObject(), and persp_ref.
Referenced by box3d_set_new_z_orders_case1(), box3d_snap(), box3d_XY_axes_are_swapped(), corners_for_PLs(), Box3D::VPDrag::drawLinesForFace(), get_center_screen(), get_corner_screen(), pt_lies_in_PL_sector(), recompute_z_orders(), release(), set_center(), set_corner(), and VP_lies_in_PL_sector().
Proj::Pt3 SPBox3D::get_proj_center | ( | ) |
Definition at line 309 of file box3d.cpp.
References Proj::Pt3::normalize(), orig_corner0, orig_corner7, Proj::X, Proj::Y, and Proj::Z.
Referenced by get_center_screen().
void SPBox3D::position_set | ( | ) |
Definition at line 241 of file box3d.cpp.
References SPObject::children.
Referenced by Inkscape::UI::Tools::Box3dTool::drag(), and set().
int SPBox3D::pt_lies_in_PL_sector | ( | Geom::Point const & | pt, |
int | id1, | ||
int | id2, | ||
Box3D::Axis | axis | ||
) | const |
Definition at line 1104 of file box3d.cpp.
References Proj::Pt2::affine(), get_corner_screen(), get_perspective(), Persp3D::get_VP(), Box3D::Line::lie_on_same_side(), Box3D::lies_in_sector(), Persp3D::perspective_impl, Box3D::toProj(), Persp3D::VP_is_finite(), and w.
Referenced by box3d_set_new_z_orders_case1(), and VP_lies_in_PL_sector().
bool SPBox3D::recompute_z_orders | ( | ) |
Definition at line 906 of file box3d.cpp.
References Proj::Pt2::affine(), Box3D::axes, Proj::axes, box3d_aux_set_z_orders(), box3d_everted_directions(), box3d_half_line_crosses_joining_line(), box3d_set_new_z_orders_case0(), box3d_set_new_z_orders_case1(), box3d_set_new_z_orders_case2(), box3d_swap_sides(), get_corner_screen(), get_perspective(), Persp3D::get_PL_dir_from_pt(), Persp3D::get_VP(), Box3D::lies_in_sector(), Box3D::NONE, Persp3D::perspective_impl, Box3D::toProj(), Persp3D::VP_is_finite(), Geom::X, Proj::X, Box3D::X, Geom::Y, Proj::Y, Box3D::Y, Proj::Z, Box3D::Z, and z_orders.
Referenced by set_z_orders().
void SPBox3D::relabel_corners | ( | ) |
Definition at line 1161 of file box3d.cpp.
References box3d_swap_coords(), Proj::X, Proj::Y, and Proj::Z.
Referenced by Inkscape::UI::Tools::Box3dTool::finishItem().
|
overridevirtual |
Reimplemented from SPObject.
Definition at line 77 of file box3d.cpp.
References Inkscape::URIReference::detach(), SPObject::document, Persp3D::document_first_persp(), get_perspective(), persp_href, persp_ref, Persp3D::perspective_impl, SPGroup::release(), Persp3D::remove_box(), and SPDocument::setCurrentPersp3D().
|
overridevirtual |
Reimplemented from SPObject.
Definition at line 107 of file box3d.cpp.
References Inkscape::URIReference::attach(), Inkscape::URIReference::detach(), INKSCAPE_BOX3D_CORNER0, INKSCAPE_BOX3D_CORNER7, INKSCAPE_BOX3D_PERSPECTIVE_ID, key, orig_corner0, orig_corner7, persp_href, persp_ref, position_set(), save_corner0, save_corner7, and SPGroup::set().
void SPBox3D::set_center | ( | Geom::Point const & | new_pos, |
Geom::Point const & | old_pos, | ||
Box3D::Axis | movement, | ||
bool | constrained | ||
) |
Definition at line 483 of file box3d.cpp.
References box3d_snap(), Box3D::Line::closest_to(), get_perspective(), Box3D::NONE, Proj::Pt3::normalize(), orig_corner0, orig_corner7, Persp3D::perspective_impl, Proj::X, Box3D::X, Box3D::XYZ, Proj::Y, Box3D::Y, Proj::Z, and Box3D::Z.
void SPBox3D::set_corner | ( | unsigned int | id, |
Geom::Point const & | new_pos, | ||
Box3D::Axis | movement, | ||
bool | constrained | ||
) |
Definition at line 430 of file box3d.cpp.
References box3d_get_proj_corner(), box3d_snap(), Box3D::Line::closest_to(), get_perspective(), Box3D::NONE, Proj::Pt3::normalize(), orig_corner0, orig_corner7, Persp3D::perspective_impl, save_corner0, save_corner7, Proj::X, Box3D::X, Box3D::XYZ, Proj::Y, Box3D::Y, Proj::Z, and Box3D::Z.
|
overridevirtual |
Reimplemented from SPItem.
Definition at line 253 of file box3d.cpp.
References child, SPObject::children, and Geom::identity().
void SPBox3D::set_z_orders | ( | ) |
Definition at line 1077 of file box3d.cpp.
References box3d_get_sides(), SPItem::lowerToBottom(), recompute_z_orders(), and z_orders.
Referenced by Inkscape::UI::Tools::Box3dTool::drag().
void SPBox3D::switch_perspectives | ( | Persp3D * | old_persp, |
Persp3D * | new_persp, | ||
bool | recompute_corners = false |
||
) |
Definition at line 1229 of file box3d.cpp.
References Persp3D::add_box(), get_corner_screen(), SPObject::getId(), Proj::Pt3::normalize(), orig_corner0, orig_corner7, Persp3D::perspective_impl, Persp3D::remove_box(), SPObject::setAttribute(), Proj::Z, and z0.
|
inlineoverridevirtual |
|
overridevirtual |
Reimplemented from SPObject.
Definition at line 178 of file box3d.cpp.
References SPGroup::update().
int SPBox3D::VP_lies_in_PL_sector | ( | Proj::Axis | vpdir, |
int | id1, | ||
int | id2, | ||
Box3D::Axis | axis | ||
) | const |
Definition at line 1136 of file box3d.cpp.
References Proj::Pt2::affine(), get_perspective(), Persp3D::get_VP(), Persp3D::perspective_impl, pt_lies_in_PL_sector(), and Persp3D::VP_is_finite().
Referenced by box3d_set_new_z_orders_case2().
|
overridevirtual |
Reimplemented from SPObject.
Definition at line 191 of file box3d.cpp.
References Proj::Pt3::coord_string(), Inkscape::XML::Document::createElement(), SPDocument::getCurrentPersp3D(), SPObject::getId(), Inkscape::URIReference::getURI(), Proj::Pt3::normalize(), orig_corner0, orig_corner7, persp_href, persp_ref, SPObject::repr, save_corner0, save_corner7, Inkscape::XML::Node::setAttribute(), Inkscape::XML::Node::setAttributeOrRemoveIfEmpty(), Inkscape::URI::str(), and SPGroup::write().
int SPBox3D::my_counter |
Proj::Pt3 SPBox3D::orig_corner0 |
Definition at line 41 of file box3d.h.
Referenced by box3d_check_for_swapped_coords(), box3d_everted_directions(), box3d_exchange_coords(), box3d_get_proj_corner(), box3d_swap_coords(), corners_for_PLs(), Inkscape::UI::Tools::Box3dTool::drag(), Inkscape::UI::Tools::Box3dTool::finishItem(), get_proj_center(), set(), set_center(), set_corner(), switch_perspectives(), and write().
Proj::Pt3 SPBox3D::orig_corner7 |
Definition at line 42 of file box3d.h.
Referenced by box3d_check_for_swapped_coords(), box3d_everted_directions(), box3d_exchange_coords(), box3d_get_proj_corner(), box3d_swap_coords(), corners_for_PLs(), Inkscape::UI::Tools::Box3dTool::drag(), Inkscape::UI::Tools::Box3dTool::finishItem(), get_proj_center(), set(), set_center(), set_corner(), switch_perspectives(), and write().
char* SPBox3D::persp_href |
Persp3DReference* SPBox3D::persp_ref |
Proj::Pt3 SPBox3D::save_corner0 |
Definition at line 44 of file box3d.h.
Referenced by box3d_snap(), set(), set_corner(), and write().
Proj::Pt3 SPBox3D::save_corner7 |
Definition at line 45 of file box3d.h.
Referenced by box3d_snap(), set(), set_corner(), and write().
Box3D::Axis SPBox3D::swapped |
Definition at line 47 of file box3d.h.
Referenced by box3d_check_for_swapped_coords(), box3d_exchange_coords(), and SPBox3D().
int SPBox3D::z_orders[6] |
Definition at line 36 of file box3d.h.
Referenced by build(), recompute_z_orders(), set_z_orders(), and SPBox3D().