a2dEllipticArc Class Reference
[a2dCanvasObject related objects]

a2dEllipticArc centered at x,y More...

#include <canprim.h>

Inheritance diagram for a2dEllipticArc:

Inheritance graph
[legend]
Collaboration diagram for a2dEllipticArc:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 a2dEllipticArc ()
 constructor
 a2dEllipticArc (double xc, double yc, double width, double height, double start, double end, bool chord=false, double contourwidth=0)
 Constructor.
 a2dEllipticArc (const a2dEllipticArc &ori, CloneOptions options)
 constructor for cloning
 ~a2dEllipticArc ()
 destructor
virtual a2dObjectClone (CloneOptions options) const
 This is here so that this class cannot be used directly.
void SetStart (double start)
 set start angle
double GetStart ()
 return start angle
void SetEnd (double end)
 set end angle
double GetEnd ()
 return end angle
void SetChord (bool chord)
 if true draw as a chord ( no fill end no lines to center )
bool GetChord ()
 get chord setting
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
a2dVertexListGetAsPolygon ()
a2dCanvasObjectList * GetAsCanvasVpaths (bool transform=true)
 when implemented the object without its children, is converted to
void SetContourWidth (double width)
 set the Contour width of the shape
double GetContourWidth () const
 get the Contour width of the shape

Static Public Attributes

static a2dPropertyIdDoublePROPID_StartAngle = NULL
static a2dPropertyIdDoublePROPID_EndAngle = NULL
static a2dPropertyIdBoolPROPID_Chord = NULL

Protected Member Functions

virtual bool DoStartEdit (wxUint16 editmode, wxEditStyle editstyle)
 only used for editable objects and under control of a editing tool.
void OnChar (wxKeyEvent &event)
 default handler for character events
void OnHandleEvent (a2dHandleMouseEvent &event)
 called if a mouse event occured on a child object, that is a handle
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
bool DoUpdate (UpdateMode mode, const a2dBoundingBox &childbox, const a2dBoundingBox &clipbox, const a2dBoundingBox &propbox)
 Update derived Object specific things ( mainly boundingbox).

Protected Attributes

bool m_chord
 drawn as a chord ( no fill end no lines to center )
double m_start
 start angle
double m_end
 end angle
double m_contourwidth
 if != 0 you get a contour around the rectangle ( donut like ).


Detailed Description

a2dEllipticArc centered at x,y

Definition at line 1381 of file canprim.h.


Constructor & Destructor Documentation

a2dEllipticArc::a2dEllipticArc ( double  xc,
double  yc,
double  width,
double  height,
double  start,
double  end,
bool  chord = false,
double  contourwidth = 0 
)

Constructor.

Parameters:
xc,: x center
yc,: y center
width,: Width of Arc
height,: Heigth of Arc
start,: Start Angle degrees
end,: End Angle in degrees
chord if true only show outline.
contourwidth to give a width to the cord

Definition at line 3646 of file canprim.cpp.


Member Function Documentation

void a2dEllipticArc::SetStart ( double  start  )  [inline]

set start angle

Remarks:
As side-effect the ellipse is set pending for redraw
Parameters:
start start angle in degrees

Definition at line 1416 of file canprim.h.

void a2dEllipticArc::SetEnd ( double  end  )  [inline]

set end angle

Remarks:
As side-effect the ellipse is set pending for redraw
Parameters:
end end angle in degrees

Definition at line 1426 of file canprim.h.

void a2dEllipticArc::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.

Reimplemented in a2dEndsEllipticChord.

Definition at line 3923 of file canprim.cpp.

a2dCanvasObjectList * a2dEllipticArc::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 3700 of file canprim.cpp.

bool a2dEllipticArc::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.

Returns:
true is this object can be edited and is initialized for that.

Todo:
edit of bbox ( children or not included )

Reimplemented from a2dWH.

Definition at line 4007 of file canprim.cpp.

void a2dEllipticArc::DoRender ( a2dIterC ic,
OVERLAP  clipparent 
) [protected, virtual]

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:

  • 1- clip object against area to redraw.
  • 2- iterate on layers when needed.
A a2dCanvasObject is rendered as a + (plus sign) when there or no children.

Reimplemented from a2dCanvasObject.

Reimplemented in a2dEndsEllipticChord.

Definition at line 3875 of file canprim.cpp.

bool a2dEllipticArc::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.

Parameters:
ic iterative context ( e.g. current transform WITH the local transform applied )
hitEvent stores hit information
Returns:
true if hit

Reimplemented from a2dWH.

Reimplemented in a2dEndsEllipticChord.

Definition at line 3939 of file canprim.cpp.

bool a2dEllipticArc::DoUpdate ( UpdateMode  mode,
const a2dBoundingBox childbox,
const a2dBoundingBox clipbox,
const a2dBoundingBox propbox 
) [protected, virtual]

Update derived Object specific things ( mainly boundingbox).

Calculates the boundingbox of the object (exclusif base class child objects but with other nested objects).

Parameters:
mode way to update the objects
childbox size of children boundingbox
clipbox clip to this
propbox size of properties boundingbox
Remarks:
in a derived class this function can also be used to update object specific cache data.

force may or may not have direct influence on the object itself, if this function is called directly for some reason (e.g from derived objects), you must invalidate the boudingbox yourself. GetDrawerBox()->SetValid( false );

Reimplemented from a2dWH.

Reimplemented in a2dEndsEllipticChord.

Definition at line 3797 of file canprim.cpp.


The documentation for this class was generated from the following files:
a2dEllipticArc Class Reference -- Tue Aug 31 18:26:24 2010 -- 31 Aug 2010 -- 1.5.5 -- wxArt2D -- . -- Main Page Reference Documentation