43 if ((flags & SP_OBJECT_WRITE_BUILD) && !
repr) {
49 if (flags & SP_OBJECT_WRITE_EXT) {
75 guint
desc = atoi (value);
78 g_warning (
"desc is not a face id: =%s=", value);
98 if (flags & (SP_OBJECT_MODIFIED_FLAG | SP_OBJECT_STYLE_MODIFIED_FLAG | SP_OBJECT_VIEWPORT_MODIFIED_FLAG)) {
99 flags &= ~SP_OBJECT_USER_MODIFIED_FLAG_B;
102 if (flags & (SP_OBJECT_MODIFIED_FLAG |
103 SP_OBJECT_STYLE_MODIFIED_FLAG |
104 SP_OBJECT_VIEWPORT_MODIFIED_FLAG)) {
118 repr_side->
setAttribute(
"sodipodi:type",
"inkscape:box3dside");
149 auto box = cast<SPBox3D>(
parent);
151 g_warning(
"Parent of 3D box side is not a 3D box.");
169 if (!box->get_corner_screen(
corners[0]).isFinite() ||
170 !box->get_corner_screen(
corners[1]).isFinite() ||
171 !box->get_corner_screen(
corners[2]).isFinite() ||
172 !box->get_corner_screen(
corners[3]).isFinite() )
174 g_warning (
"Trying to draw a 3D box side with invalid coordinates.");
189 if (before && *before !=
c) {
240 auto box = cast<SPBox3D>(
parent);
241 return box ? box->persp_ref->getObject() :
nullptr;
Lookup dictionary for attributes/properties.
@ INKSCAPE_BOX3D_SIDE_TYPE
static void box3d_side_compute_corner_ids(Box3DSide *side, unsigned int corners[4])
Inkscape::XML::Node * write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, unsigned int flags) override
Box3D::FrontOrRear front_or_rear
void set(SPAttr key, char const *value) override
void update(SPCtx *ctx, unsigned int flags) override
static Box3DSide * createBox3DSide(SPBox3D *box)
void set_shape() override
Persp3D * perspective() const
Glib::ustring axes_string() const
Inkscape::XML::Node * convert_to_path() const
void build(SPDocument *doc, Inkscape::XML::Node *repr) override
Sequence of contiguous curves, aka spline.
void start(Point const &p)
Interface for refcounted XML nodes.
void setAttribute(Util::const_char_ptr key, Util::const_char_ptr value)
Change an attribute of this node.
bool setAttributeInt(Util::const_char_ptr key, int val)
Typed SVG document implementation.
SPRoot * getRoot()
Returns our SPRoot.
Inkscape::XML::Document * getReprDoc()
Our Inkscape::XML::Document.
void update(SPCtx *ctx, unsigned int flags) override
bool hasPathEffectOnClipOrMaskRecursive(SPLPEItem *shape) const
returns true when any LPE apply to clip or mask.
SPObject is an abstract base class of all of the document nodes at the SVG document level.
int getIntAttribute(char const *key, int def)
Inkscape::XML::Node * repr
char * desc() const
Returns the description of this object, or NULL if there is none.
void readAttr(char const *key)
Read value of key attribute from XML node into object.
char const * getAttribute(char const *name) const
SPObject * appendChildRepr(Inkscape::XML::Node *repr)
Append repr as child of this object.
void requestDisplayUpdate(unsigned int flags)
Queues an deferred update of this object's display.
Inkscape::XML::Node * write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, unsigned int flags) override
void build(SPDocument *document, Inkscape::XML::Node *repr) override
void set(SPAttr key, char const *value) override
std::shared_ptr< Geom::PathVector const > _curve
void setCurveInsync(Geom::PathVector const *)
void setCurveBeforeLPE(Geom::PathVector const *)
Geom::PathVector const * curveBeforeLPE() const
Return a borrowed pointer of the curve before LPE (if any exists) or NULL if there is no curve.
static char const *const parent
Box3D::Axis third_axis_direction(Box3D::Axis dir1, Box3D::Axis dir2)
Given two axis directions out of {X, Y, Z} or the corresponding plane, return the remaining one We do...
Box3D::Axis orth_plane_or_axis(Box3D::Axis axis)
Glib::ustring string_from_axes(Box3D::Axis axis)
bool is_face_id(unsigned int face_id)
Box3D::Axis extract_first_axis_direction(Box3D::Axis dirs)
Box3D::Axis extract_second_axis_direction(Box3D::Axis dirs)
bool is_plane(Box3D::Axis plane)
static cairo_user_data_key_t key
void sp_lpe_item_update_patheffect(SPLPEItem *lpeitem, bool wholetree, bool write, bool with_satellites)
Calls any registered handlers for the update_patheffect action.
Interface for XML documents.
virtual Node * createElement(char const *name)=0
static void sp_svg_write_path(Inkscape::SVG::PathString &str, Geom::Path const &p, bool normalize=false)
Interface for XML documents.