a2dEndsLine Class Reference
[a2dCanvasObject related objects]

a2dEndsLine with begin and/or end object. More...

#include <canprim.h>

Inheritance diagram for a2dEndsLine:

Inheritance graph
[legend]
Collaboration diagram for a2dEndsLine:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 a2dEndsLine (double x1, double y1, double x2, double y2, double contourwidth=0)
 constructor
 a2dEndsLine (const a2dEndsLine &ori, CloneOptions options)
 constructor using a a2dEndsLine as input
 a2dEndsLine (const a2dSLine &ori, CloneOptions options)
 constructor using a a2dSLine as input (end and begin are set to NULL )
virtual a2dObjectClone (CloneOptions options) const
 Clone this object and return a pointer to the new object.
void SetBegin (a2dCanvasObject *begin)
 set object to draw as begin point
a2dCanvasObjectGetBegin ()
 dummies to be compatible with a2dEndsLine
void SetEnd (a2dCanvasObject *end)
 set object to draw as end point
a2dCanvasObjectGetEnd ()
 dummies to be compatible with a2dEndsLine
void SetEndScaleX (double xs)
 Scale begin and end object with this factor in X.
double GetEndScaleX ()
 dummies to be compatible with a2dEndsLine
void SetEndScaleY (double ys)
 Scale begin and end object with this factor in Y.
double GetEndScaleY ()
 dummies to be compatible with a2dEndsLine
void SetStyleToArrow (bool takeStyleToArrow)
 if set take style changes on line to the arrow objects
bool GetStyleToArrow ()
 if true take style changes on line to the arrow objects
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
virtual void DoWalker (wxObject *parent, a2dWalkerIOHandler &handler)
 iterate over this object and its children

Protected Member Functions

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

a2dCanvasObjectPtr m_begin
 object drawn at begin point
a2dCanvasObjectPtr m_end
 object drawn at end point
double m_xscale
 scale begin and end object with this factor in X
double m_yscale
 scale begin and end object with this factor in Y
bool m_takeStyleToArrow
 if set take style changes on line to the arrow objects


Detailed Description

a2dEndsLine with begin and/or end object.

Definition at line 1858 of file canprim.h.


Constructor & Destructor Documentation

a2dEndsLine::a2dEndsLine ( double  x1,
double  y1,
double  x2,
double  y2,
double  contourwidth = 0 
)

constructor

Parameters:
x1,: x line start
y1,: y line start
x2,: x line end
y2,: y line end

Definition at line 5560 of file canprim.cpp.


Member Function Documentation

void a2dEndsLine::SetEndScaleX ( double  xs  )  [inline, virtual]

Scale begin and end object with this factor in X.

Remarks:
As side-effect this object is set pending for redraw

Reimplemented from a2dSLine.

Definition at line 1898 of file canprim.h.

void a2dEndsLine::SetEndScaleY ( double  ys  )  [inline, virtual]

Scale begin and end object with this factor in Y.

Remarks:
As side-effect this object is set pending for redraw

Reimplemented from a2dSLine.

Definition at line 1906 of file canprim.h.

void a2dEndsLine::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 a2dSLine.

Definition at line 5799 of file canprim.cpp.

void a2dEndsLine::DoWalker ( wxObject *  parent,
a2dWalkerIOHandler handler 
) [virtual]

iterate over this object and its children

This function allows you to extend the functionality of all a2dCanvasObject classes in a a2dCanvasDocument, without adding extra members to these objects.

Default functions are called on the a2dWalkerIOHandler, which redirect the calls to other functions based on this object its classname. On can register classes to a2dWalkerIOHandler or derived classes. This way for each unique object in the document there can be a function in a2dWalkerIOHandler.

Returns:
false if some object did not have a function attached via a2dWalkerIOHandler.
See a2dWalkerIOHandler for more.

Reimplemented from a2dCanvasObject.

Definition at line 5834 of file canprim.cpp.

void a2dEndsLine::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 a2dSLine.

Reimplemented in a2dScaledEndLine.

Definition at line 5703 of file canprim.cpp.

bool a2dEndsLine::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 a2dSLine.

Definition at line 5847 of file canprim.cpp.

bool a2dEndsLine::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 a2dCanvasObject.

Reimplemented in a2dScaledEndLine.

Definition at line 5671 of file canprim.cpp.


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