|
wxArt2D
|
while iterating a a2dCanvasDocument, this holds the context. More...
#include <canobj.h>

Public Member Functions | |
| a2dIterC () | |
| constructor used when drawer is not known | |
| a2dIterC (a2dDrawingPart *drawer, int level=0) | |
| constructor used when drawer is known ( usually the case ) More... | |
| ~a2dIterC () | |
| destructor | |
| void | SetDisableInvert (bool disableInvert) |
| when true, disable inversion of matrixes More... | |
| bool | GetDisableInvert () |
| see SetDisableInvert() | |
| void | Reset () |
| Reset this object for beeing reused. It will keep the drawer but NULL object infos. | |
| a2dIterPP * | Push (const a2dAffineMatrix &matrix, OVERLAP clip) |
| a2dIterPP * | Push (a2dCanvasObject *object, OVERLAP clip) |
| void | Pop () |
| a2dIterPP * | Last () |
| void | SetHitMarginDevice (int pixels) |
| used to extend a hittest with the number of pixels. More... | |
| void | SetHitMarginWorld (double world) |
| used to extend a hittest with the given margin in world coordinates. More... | |
| double | GetHitMarginWorld () |
| Get HitMargin in World units. | |
| double | ExtendDeviceToWorld (int extend) |
| Transform a pixel extend from device to world units. More... | |
| double | GetTransformedHitMargin () |
| transformed to object its coordinate system | |
| wxUint16 | GetLayer () |
| get the layer that is to be rendered | |
| void | SetLayer (wxUint16 layer) |
| set the layer that is to be rendered More... | |
| bool | GetGenerateCommands () |
| get setting for command generation or not. | |
| void | SetGenerateCommands (bool generateCommands) |
| set to generate command or not in certain situations. | |
| const a2dAffineMatrix & | GetMappingTransform () const |
| get the mapping matrix | |
| const a2dAffineMatrix & | GetUserToDeviceTransform () const |
| get matrix which transforms directly from relative world coordinates to device | |
| a2dDrawingPart * | GetDrawingPart () const |
| get current a2dDrawingPart | |
| a2dDrawer2D * | GetDrawer2D () const |
| get current a2dDrawer2D | |
| void | SetDrawStyle (a2dDocumentRenderStyle drawstyle) |
| set drawstyle used for rendering the document More... | |
| a2dDocumentRenderStyle | GetDrawStyle () |
| get drawstyles used for drawing the document | |
| a2dCanvasObject * | GetParent () const |
| when traversing tree this the object one level higher. More... | |
| a2dCanvasObject * | GetObject () const |
| the object where the iterative context is currently | |
| const a2dAffineMatrix & | GetTransform () const |
| Get the accumulated transform up to and including m_lworld of the current object. More... | |
| const a2dAffineMatrix & | GetInverseTransform () const |
| Inverse of GetTransform() | |
| const a2dAffineMatrix & | GetParentTransform () const |
| Get the accumulated transform up to but NOT including m_lworld of the current obejct. More... | |
| const a2dAffineMatrix & | GetInverseParentTransform () const |
| inverse of GetParentTransform() | |
| int | GetLevel () const |
| number of levels deep we are inside a document as seen from the m_top | |
| void | SetCorridorPath (bool OnOff, a2dCanvasObject *captureObject=NULL) |
| to set corridor path ( also to captured object), its a2dCanvasOFlags::IsOnCorridorPath flag is set on or off. More... | |
| void | SetCorridorPathToParent () |
| void | SetCorridorPathCaptureObject (a2dCanvasObject *captureObject) |
| bool | GetFoundCorridorEnd () |
| when there is a corridor path set, this return if end has bin found while iterating. | |
| void | SetFoundCorridorEnd (bool foundCorridorEnd) |
| when there is a corridorPath set, this is used internal to set this flag to indicate that the end of it was found. | |
| void | SetStrokeWorldExtend (double worldStrokeExtend) |
| Set strokeworld extend of last added object, used in a2dCanvasObject::DoIsHitWorld() More... | |
| double | GetWorldStrokeExtend () |
| OVERLAP | GetClipStatus () const |
| what is the clipping withing the current view for the last added object in context | |
| OVERLAP | GetParentClipStatus () const |
| what is the clipping withing the current view for the second last added object in context | |
| void | SetClipStatus (OVERLAP status) |
| set the clipping withing the current view for the last added object in context | |
| a2dCanvasObjectFilter * | GetObjectFilter () |
| get the filter set for the iteration context. | |
| void | SetObjectFilter (a2dCanvasObjectFilter *filter) |
| set object filter class. | |
| bool | FilterObject (a2dCanvasObject *canvasObject) |
| apply object filter | |
| void | EndFilterObject (a2dCanvasObject *canvasObject) |
| called when filter ends | |
| void | SetPerLayerMode (bool value) |
| if set the rendering is done layers by layer from the top | |
| bool | GetPerLayerMode () |
| if set the rendering is done layers by layer from the top | |
| void | SetRenderChildDerived (bool value) |
| when set child object in derived a2dCanvasObject are rendered, else only the object itself. | |
| bool | GetRenderChildDerived () |
| when set child object in derived a2dCanvasObject are rendered, else only the object itself. | |
| void | SetDeepestHit (a2dCanvasObject *canvasObject) |
| set during event processing down the hierarchy, to the deepest object that was hit | |
| a2dCanvasObject * | GetDeepestHit () const |
| get deepest object that was hit during event processing down the hierarchy. | |
| void | SetUpdateHint (a2dCanViewUpdateFlagsMask updateHint) |
| a2dCanViewUpdateFlagsMask | GetUpdateHint () |
Public Attributes | |
| a2dSmrtPtrList< a2dIterPP > | m_contextList |
| a2dSmrtPtrList< a2dIterPP > | m_contextListDeep |
Friends | |
| class | a2dIterPP |
| class | a2dIterCU |
| class | a2dCorridor |
while iterating a a2dCanvasDocument, this holds the context.
The context is a collection of information, which might be needed when traversing the document. e.g. Transforms for drawing and conversion to absolute coordinates are stored here.
Specific information in the context can be valid or not. If the information is set and is valid, a flag is set too. This flag is checked when information is asked for. Asking for non valid information will result in an assert.
| a2dIterC::a2dIterC | ( | a2dDrawingPart * | drawer, |
| int | level = 0 |
||
| ) |
constructor used when drawer is known ( usually the case )
| drawer | the drawer that is currently in use. |
| level | how deep is the starting object to render from the ShowObject of the a2dDrawingPart. |
Definition at line 514 of file canobj.cpp.
| double a2dIterC::ExtendDeviceToWorld | ( | int | extend | ) |
Transform a pixel extend from device to world units.
If no drawer is there (e.g. command procesing) the return value will be zero
Definition at line 611 of file canobj.cpp.
| a2dCanvasObject * a2dIterC::GetParent | ( | void | ) | const |
when traversing tree this the object one level higher.
Used internal during rendering etc. During recursive traversing a a2dCanvasDocument from top group that is displayed this holds the a2dCanvasObject that is one level higher in the branch that is traversed used during rendering etc., to know what is the parent object in a branch that is being rendered
Definition at line 641 of file canobj.cpp.
| const a2dAffineMatrix & a2dIterC::GetParentTransform | ( | ) | const |
Get the accumulated transform up to but NOT including m_lworld of the current obejct.
This converts from local coordinates of the curent object to world coordinates !!!! I am not sure if it should contains the view transform (world->device) as well !!!!
Definition at line 709 of file canobj.cpp.
| const a2dAffineMatrix & a2dIterC::GetTransform | ( | ) | const |
Get the accumulated transform up to and including m_lworld of the current object.
This converts from relative local coordinates of the current object to world coordinates. This matrix transforms all drawing primitives used to draw a a2dCanvasObject from relative world coordinates to absolute world coordinates.
Definition at line 663 of file canobj.cpp.
|
inline |
| void a2dIterC::SetCorridorPath | ( | bool | OnOff, |
| a2dCanvasObject * | captureObject = NULL |
||
| ) |
to set corridor path ( also to captured object), its a2dCanvasOFlags::IsOnCorridorPath flag is set on or off.
The iteration context knows its parent object via its m_bottom and m_parent a2dIterCU. Each a2dIterCU added when going deeper into the drawing hierarchy, knows from which object it came. This way, it is possible to iterate back to the top/show object in a a2dDrawingPart. All canvasobjects passed that way is called the event path. Of course when going up in hierarchy, the event path is becoming smaller again. And when arriving at the top it will be zero. To preserve the event path to a specific canvas object, a flag can be set along the canvas objects in the current event path. Those flags will be kept intact inside the canvasobjects, even if the event path is changing after setting the flags. The a2dCanvasOFlags::IsOnCorridorPath set this way, is/can be used to find and redirect events to the objects along or at the end of this path. The path created like this is called the Corridor path.
When capturing an object, the corridor is used to redirect events to that object, even if the object is a deeper nested child. A non captured corridor also redirects events to the last object in the corridor, but still does normal event processing from that point on. So only a positive hittest will really make the event go to the object. When also capturing the object at the end of a corridor, the mouse event is always going to that object, even if it does not hit it.
| OnOff | to set the corridor path on or off. |
| captureObject | to set this as a captured object at the end of the corridor, if NULL non is captured. |
Definition at line 739 of file canobj.cpp.
| void a2dIterC::SetCorridorPathCaptureObject | ( | a2dCanvasObject * | captureObject | ) |
leaves corridorpath as is, but resets the capture object at the end of the corridor to the given object. If NULL, the corridor is set to non captured.
Definition at line 799 of file canobj.cpp.
|
inline |
|
inline |
set drawstyle used for rendering the document
The drawstyle is set in a2dCanvasDocument when rendering parts of the document.
| drawstyle | one of the draw styles |
| void a2dIterC::SetHitMarginDevice | ( | int | pixels | ) |
used to extend a hittest with the number of pixels.
to be able to hit a line of width zero, a margin is needed to hit it, which is set here. In fact this value is directly converted to a value in world coordinates, using the current GetDrawer2D(). GetHitMarginWorld() returns this value.
Definition at line 596 of file canobj.cpp.
| void a2dIterC::SetHitMarginWorld | ( | double | world | ) |
used to extend a hittest with the given margin in world coordinates.
to be able to hit a line of width zero, a margin is needed to hit it, which is set here.
Definition at line 601 of file canobj.cpp.
|
inline |
|
inline |
Set strokeworld extend of last added object, used in a2dCanvasObject::DoIsHitWorld()
Holds the size/width of the Stroke in world coordinates, else 0. This can be used in derived a2dCanvasObject to do a proper hittest. If the stroke is of type pixel, that value will be converted into world coordinates.