From 1ab271aaa35acc07f07c88945f461d42dc7352fc Mon Sep 17 00:00:00 2001 From: Markus Engel Date: Sat, 18 Aug 2012 23:51:50 +0200 Subject: Added "virtual pad" to SPRect. (bzr r11608.1.13) --- src/sp-rect.h | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) (limited to 'src/sp-rect.h') diff --git a/src/sp-rect.h b/src/sp-rect.h index 7bc85dd8a..f33323a4d 100644 --- a/src/sp-rect.h +++ b/src/sp-rect.h @@ -28,8 +28,12 @@ class SPRect; class SPRectClass; +class CRect; + +class SPRect : public SPShape { +public: + CRect* crect; -struct SPRect : public SPShape { SVGLength x; SVGLength y; SVGLength width; @@ -43,6 +47,30 @@ struct SPRectClass { }; +class CRect : public CShape { +public: + CRect(SPRect* sprect); + virtual ~CRect(); + + virtual void onBuild(SPDocument* doc, Inkscape::XML::Node* repr); + + void onSet(unsigned key, gchar const *value); + void onUpdate(SPCtx* ctx, unsigned int flags); + + virtual Inkscape::XML::Node* onWrite(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags); + virtual gchar* onDescription(); + + void onSetShape(); + virtual Geom::Affine onSetTransform(Geom::Affine const& xform); + + void onSnappoints(std::vector &p, Inkscape::SnapPreferences const *snapprefs); + void onConvertToGuides(); + +protected: + SPRect* sprect; +}; + + /* Standard GType function */ GType sp_rect_get_type (void); -- cgit v1.2.3