#include <canprim.h>


Public Member Functions | |
| a2dRect (double x, double y, double w, double h, double radius=0, double contourwidth=0) | |
| constructor | |
| a2dRect (const a2dPoint2D &p1, const a2dPoint2D &p2, double radius=0, double contourwidth=0) | |
| constructor | |
| a2dRect (const a2dBoundingBox &bbox, double radius=0, double contourwidth=0) | |
| constructor | |
| a2dRect (const a2dRect &rec, CloneOptions options) | |
| virtual a2dObject * | Clone (CloneOptions options) const |
| This is here so that this class cannot be used directly. | |
| void | SetContourWidth (double width) |
| set the Contour width of the shape | |
| double | GetContourWidth () const |
| get the Contour width of the shape | |
| void | SetRadius (double radius) |
| set corner radius of rectangle | |
| double | GetRadius () const |
| return radius | |
| void | SetBoxType (int type) |
| GDSII compatible to sub identify types of rectangles. | |
| int | GetBoxType () const |
| GDSII compatible to sub identify types of rectangles. | |
| virtual void | DoSave (wxObject *parent, a2dIOHandlerXmlSerOut &out, a2dXmlSer_flag xmlparts, a2dObjectList *towrite) |
| write object specific CVGL data | |
| void | DoLoad (wxObject *parent, a2dIOHandlerXmlSerIn &parser, a2dXmlSer_flag xmlparts) |
| load object specific CVG data | |
| a2dVertexList * | GetAsPolygon () |
| a2dCanvasObjectList * | GetAsCanvasVpaths (bool transform=true) |
| when implemented the object without its children, is converted to | |
| bool | GeneratePins (a2dPinClass *toConnectTo, a2dConnectTask task, double x, double y) |
| create pins in derived objects. | |
| void | OnHandleEvent (a2dHandleMouseEvent &event) |
| called if a mouse event occured on a child object, that is a handle | |
Static Public Attributes | |
| static a2dPropertyIdDouble * | PROPID_Radius = NULL |
Protected Member Functions | |
| virtual void | EditFeedback (a2dIterC &ic, const a2dFeedbackId *id, a2dCanvasObject *currentEdit=0, int depth=INT_MAX, a2dCanvasObjectFlagsMask flags=0, double x=0, double y=0) |
| tool editing feedback | |
| virtual bool | DoStartEdit (wxUint16 editmode, wxEditStyle editstyle) |
| only used for editable objects and under control of a editing tool. | |
| void | DoRender (a2dIterC &ic, OVERLAP clipparent) |
| render derived object | |
| bool | DoIsHitWorld (a2dIterC &ic, a2dHitEvent &hitEvent) |
| Does hit test on the object (exclusif child objects). | |
| a2dBoundingBox | DoGetUnTransformedBbox (a2dBboxFlags flags=a2dCANOBJ_BBOX_NON) const |
Protected Attributes | |
| int | m_boxtype |
| GDSII compatible to sub identify types of rectangles. | |
| double | m_radius |
| radius in case of rounded rectangle (negatif inwards positif outwards) | |
| double | m_contourwidth |
| if != 0 you get a contour around the rectangle ( donut like ). | |
Rectangle with radius
Definition at line 1122 of file canprim.h.
| a2dRect::a2dRect | ( | double | x, | |
| double | y, | |||
| double | w, | |||
| double | h, | |||
| double | radius = 0, |
|||
| double | contourwidth = 0 | |||
| ) |
constructor
| x,: | x minimum | |
| y,: | y minimum | |
| w,: | Width of rectangle. | |
| h,: | Heigth of rectangle | |
| radius | Radius at corners (negatif inwards positif outwards). | |
| contourwidth | contour around rectangle. |
Definition at line 2462 of file canprim.cpp.
| a2dRect::a2dRect | ( | const a2dPoint2D & | p1, | |
| const a2dPoint2D & | p2, | |||
| double | radius = 0, |
|||
| double | contourwidth = 0 | |||
| ) |
constructor
| p1 | one point of rectangle | |
| p2 | second point on diagonal | |
| radius | Radius at corners (negatif inwards positif outwards). | |
| contourwidth | contour around rectangle. |
Definition at line 2469 of file canprim.cpp.
| a2dRect::a2dRect | ( | const a2dBoundingBox & | bbox, | |
| double | radius = 0, |
|||
| double | contourwidth = 0 | |||
| ) |
constructor
| bbox | used for size of rectangle | |
| radius | Radius at corners (negatif inwards positif outwards). | |
| contourwidth | contour around rectangle. |
Definition at line 2476 of file canprim.cpp.
| void a2dRect::SetRadius | ( | double | radius | ) | [inline] |
| void a2dRect::SetBoxType | ( | int | type | ) | [inline] |
| int a2dRect::GetBoxType | ( | ) | const [inline] |
| void a2dRect::DoLoad | ( | wxObject * | parent, | |
| a2dIOHandlerXmlSerIn & | parser, | |||
| a2dXmlSer_flag | xmlparts | |||
| ) | [virtual] |
load object specific CVG data
todo ignore until this down here is fully converted.
Reimplemented from a2dWH.
Definition at line 2920 of file canprim.cpp.
| a2dCanvasObjectList * a2dRect::GetAsCanvasVpaths | ( | bool | transform = true |
) | [virtual] |
when implemented the object without its children, is converted to
to a list of a2dVectorPath's. Else wxNullCanvasObjectList is returned.
Reimplemented from a2dWH.
Definition at line 2520 of file canprim.cpp.
| bool a2dRect::GeneratePins | ( | a2dPinClass * | toConnectTo, | |
| a2dConnectTask | task, | |||
| double | x, | |||
| double | y | |||
| ) | [virtual] |
create pins in derived objects.
When wanting to connect to shapes which at construction have no pins, but still make sence to connect too, this function generates pins for the object, when connection is asked for by a tool. This is via EditFeedBack()
The idea is to generate temporary pins for the tools, so the user sees where connection are possible.
| toConnectTo | the pinClass to which the generated pin must be able to connect. | |
| task | what/how to connect | |
| x | x position of mouse or pin which wants/needs connection | |
| y | y position of mouse or pin which wants/needs connection |
Reimplemented from a2dCanvasObject.
Definition at line 2961 of file canprim.cpp.
| void a2dRect::EditFeedback | ( | a2dIterC & | ic, | |
| const a2dFeedbackId * | id, | |||
| a2dCanvasObject * | currentEdit = 0, |
|||
| int | depth = INT_MAX, |
|||
| a2dCanvasObjectFlagsMask | flags = 0, |
|||
| double | x = 0, |
|||
| double | y = 0 | |||
| ) | [protected, virtual] |
tool editing feedback
| ic | iteration context | |
| id | the id for the editing situation. | |
| currentEdit | the currently edited object or another hint object | |
| depth | recursion depth (0=this object, 1=this object+childs, ...) | |
| flags | objects with this flag set ignore the depth limit | |
| x | x world coordinate of mouse | |
| y | y world coordinate of mouse |
Reimplemented from a2dCanvasObject.
Definition at line 2956 of file canprim.cpp.
| bool a2dRect::DoStartEdit | ( | wxUint16 | editmode, | |
| wxEditStyle | editstyle | |||
| ) | [protected, virtual] |
only used for editable objects and under control of a editing tool.
If object is editable this function is used to initialize the object for editing. In general this means adding editing handles to the child list. In the event handling of the object those handles are hit and moved, the object itself is changed accordingly.
Reimplemented from a2dWH.
Reimplemented in a2dControl.
Definition at line 2668 of file canprim.cpp.
render derived object
if the object has sub objects (apart from the childobject which are handled here), those subobject most rendered by iterating on layer when needed/wanted, simular to child objects. We do not iterate here, since that is only needed if indeed there or subobjects. This will be know in a "wxDerivedCanvasObject DoRender".
SO parent objects that call this function, must:
Reimplemented from a2dCanvasObject.
Reimplemented in a2dControl.
Definition at line 2873 of file canprim.cpp.
| bool a2dRect::DoIsHitWorld | ( | a2dIterC & | ic, | |
| a2dHitEvent & | hitEvent | |||
| ) | [protected, virtual] |
Does hit test on the object (exclusif child objects).
DoIsHitWorld() should return the way the object is hit by filling a2dHitEvent::m_how with the correct info.
| ic | iterative context ( e.g. current transform WITH the local transform applied ) | |
| hitEvent | stores hit information |
Reimplemented from a2dWH.
Reimplemented in a2dControl.
Definition at line 2934 of file canprim.cpp.