a2dScaledEndLine Class Reference
[a2dCanvasObject related objects]

a2dScaledEndLine More...

#include <canprim.h>

Inheritance diagram for a2dScaledEndLine:

Inheritance graph
[legend]
Collaboration diagram for a2dScaledEndLine:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 a2dScaledEndLine (double x1, double y1, double x2, double y2, double contourwidth=0)
 constructor
 a2dScaledEndLine (const a2dScaledEndLine &ori, CloneOptions options)
 constructor using a a2dEndsLine as input
 a2dScaledEndLine (const a2dSLine &ori, CloneOptions options)
 constructor
 ~a2dScaledEndLine ()
 destructor
virtual a2dObjectClone (CloneOptions options) const
 Clone this object and return a pointer to the new object.
void SetBegin (double l1, double l2, double b, bool spline=false)
 set begin shape factors if it is a2dArrow derived
void SetEnd (double l1, double l2, double b, bool spline=false)
 set end shape factors if it is a2dArrow derived

Protected Member Functions

bool DoUpdate (UpdateMode mode, const a2dBoundingBox &childbox, const a2dBoundingBox &clipbox, const a2dBoundingBox &propbox)
 Update derived Object specific things ( mainly boundingbox).
void DoRender (a2dIterC &ic, OVERLAP clipparent)
 render derived object


Detailed Description

a2dScaledEndLine

The begin and end object on the line are scaled to the contour width. In case of a a2dArrow derived object, rendering is optimized to look good. All types of end objects are scalled up m_contourwidth. If m_contourwidth is zero, there will be no endpoints drawn.

Definition at line 1962 of file canprim.h.


Constructor & Destructor Documentation

a2dScaledEndLine::a2dScaledEndLine ( 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
contourwidth to give the line a width

Definition at line 5921 of file canprim.cpp.


Member Function Documentation

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

Definition at line 5964 of file canprim.cpp.

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

Definition at line 6000 of file canprim.cpp.


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