21 #include "a2dprivate.h"
23 #if wxART2D_USE_CANEXTOBJ
26 #include "wx/filename.h"
29 #include "wx/canextobj/sttoolext.h"
36 EVT_CHAR( a2dRenderImageZoomTool::OnChar )
37 EVT_MOUSE_EVENTS( a2dRenderImageZoomTool::OnMouseEvent )
42 GetDrawingPart()->SetMouseEvents(
false );
43 m_stcontroller = controller;
48 a2dRenderImageZoomTool::~a2dRenderImageZoomTool()
52 void a2dRenderImageZoomTool::OnChar( wxKeyEvent& event )
56 switch( event.GetKeyCode() )
74 void a2dRenderImageZoomTool::OnMouseEvent( wxMouseEvent& event )
94 wxPoint pos =
event.GetPosition();
96 if ( event.LeftDClick() && !
GetBusy() )
116 else if ( event.LeftDown() )
136 else if ( event.RightDown() )
140 else if ( event.LeftUp() &&
GetBusy() )
170 m_renderimage->
SetMappingAbs( ic, x1, y2, fabs( x1 - x2 ), fabs( y1 - y2 ) );
172 m_renderimage->
SetMappingAbs( ic, x1, y1, fabs( x1 - x2 ), fabs( y1 - y2 ) );
178 else if ( event.Dragging() &&
event.m_leftDown &&
GetBusy() )
184 dc.SetBrush( wxNullBrush );
185 dc.SetLogicalFunction( wxINVERT );
190 dc.SetBrush( wxNullBrush );
191 dc.SetPen( wxNullPen );
197 #endif // wxART2D_USE_CANEXTOBJ
#define wxDynamicCast(obj, className)
Define wxDynamicCast so that it will give a compiler error for unrelated types.
Base class for all types of strokes, understood by a2dDrawer2D classes.
a2dRenderImage is an a2dCanvasObject that is able to display a complete a2dCanvasDocument as a a2dCan...
double GetBboxMinY()
get minimum Y of the boundingbox in world coordinates relative to its parents
void SetMappingWidthHeight(double vx1, double vy1, double width, double height)
bool GetYaxis() const
get y axis orientation
double GetBboxMinX()
get minimum X of the boundingbox in world coordinates relative to its parents
a2dCanvasObject is the base class for Canvas Objects.
wxColour GetColour() const
return colour 1
double GetBboxWidth()
get width of the boundingbox in world coordinates relative to its parents
double DeviceToWorldY(double y) const
convert y from device to world coordinates
a2dCanvasObject * GetShowObject() const
return pointer of then currently shown object on the canvas.
Each a2dCommand is given a command id at construction.
void SetMappingAbs(a2dIterC &ic, double vx1, double vy1, double width, double height)
set mapping using absolute world coordinates of parent
while iterating a a2dCanvasDocument, this holds the context.
double DeviceToWorldX(double x) const
convert x from device to world coordinates
a2dCanvasObject * IsHitWorld(double x, double y, int layer=wxLAYER_ALL, a2dHitOption option=a2dCANOBJHITOPTION_NONE, bool filterSelectableLayers=false)
do a hittest on the view at coordinates x,y
double GetBboxHeight()
get height of the boundingbox in world coordinates relative to its parents
a2dCanvasGlobal * a2dCanvasGlobals
global a2dCanvasGlobal to have easy access to global settings
all headers of the canvas module