wxArt2D
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
a2dMemDcDrawer Class Reference

This class implements drawing functions for wxDC based drawing. More...

#include <dcdrawer.h>

Inheritance diagram for a2dMemDcDrawer:
Inheritance graph
[legend]
Collaboration diagram for a2dMemDcDrawer:
Collaboration graph
[legend]

Public Member Functions

 a2dMemDcDrawer (int width=0, int height=0)
 constructor ( just some default )
 
 a2dMemDcDrawer (const wxSize &size)
 Drawer having a buffer of w pixel wide and h pixels height given by size.
 
virtual void BeginDraw ()
 start to draw on this context (used to initialize a specific drawer)
 
virtual void EndDraw ()
 end drawing on this context (used to reset a specific drawer)
 
wxBitmap GetBuffer () const
 return buffer as a bitmap
 
void SetBufferSize (int w, int h)
 change the size of the buffer
 
wxBitmap GetSubBitmap (wxRect sub_rect) const
 return a bitmap representing a rectangular part of the buffer
 
virtual ~a2dMemDcDrawer ()
 destructor
 
 a2dMemDcDrawer (const a2dMemDcDrawer &other)
 copy constructor
 
void DrawImage (const wxImage &image, double x, double y, double width, double height, wxUint8 Opacity=255)
 Draw a wxImage in world coordinates. More...
 
void DrawImage (const a2dImageRGBA &image, double x, double y, double width, double height, wxUint8 Opacity=255)
 
void CopyIntoBuffer (const wxBitmap &bitm)
 
virtual void BlitBuffer (wxRect rect, const wxPoint &bufferpos=wxPoint(0, 0))
 blit given rect contents within buffer to device
 
virtual void BlitBuffer (wxDC *dc, wxRect rect, const wxPoint &bufferpos=wxPoint(0, 0))
 used for blitting to a wxDC.
 
virtual void ShiftBuffer (int dxy, bool yshift)
 quick scroll over small distance
 
- Public Member Functions inherited from a2dDcDrawer
 a2dDcDrawer (int width=0, int height=0)
 Drawer having a buffer of w pixel wide and h pixels heigh.
 
 a2dDcDrawer (const wxSize &size)
 Drawer having a buffer of w pixel wide and h pixels height given by size.
 
virtual ~a2dDcDrawer ()
 destructor
 
 a2dDcDrawer (const a2dDcDrawer &other)
 copy constructor
 
 a2dDcDrawer (const a2dDrawer2D &other)
 
void ResetStyle ()
 set a pre-defined style reseting cashed values. More...
 
virtual wxDC * GetRenderDC () const
 get the DC that is used for rendering
 
void SetRenderDC (wxDC *dc)
 set the DC that is used for rendering More...
 
wxDC * GetDeviceDC () const
 get the DC that is used for rendering
 
void SetClippingRegion (a2dVertexList *points, bool spline=false, wxPolygonFillMode fillStyle=wxODDEVEN_RULE)
 set clipping region from polygon to which everything drawn will be clipped.
 
virtual void ExtendClippingRegion (a2dVertexList *points, bool spline=false, wxPolygonFillMode fillStyle=wxODDEVEN_RULE, a2dBooleanClip clipoperation=a2dCLIP_AND)
 extend clipping region with a polygon to which everything drawn will be clipped.
 
virtual void ExtendAndPushClippingRegion (a2dVertexList *points, bool spline=false, wxPolygonFillMode fillStyle=wxODDEVEN_RULE, a2dBooleanClip clipoperation=a2dCLIP_AND)
 push on stack the current clipping region and extend clipping region More...
 
void PopClippingRegion ()
 pop a previously pushed clipping region
 
void SetClippingRegionDev (wxCoord minx, wxCoord miny, wxCoord width, wxCoord height)
 set clipping region using x y values in device coordinates
 
void SetClippingRegion (double minx, double miny, double maxx, double maxy)
 set clipping region using x y values in world coordinates
 
void DestroyClippingRegion ()
 set clipping region off
 
void DrawRoundedRectangle (double x, double y, double width, double height, double radius, bool pixelsize=false)
 Draw RoundedRectangle in world coordinates.
 
void DrawVpath (const a2dVpath *path)
 Draw vector path in world coordinates.
 
void DrawPolyPolygon (a2dListOfa2dVertexList polylist, wxPolygonFillMode fillStyle=wxODDEVEN_RULE)
 draw a list of polygons ( contour clockwise becomes hole )
 
void DrawCircle (double xc, double yc, double radius)
 Draw Circle in world coordinates. More...
 
void DrawEllipse (double xc, double yc, double width, double height)
 Draw Ellipse in world coordinates. More...
 
void DrawLine (double x1, double y1, double x2, double y2)
 Draw line in world coordinates.
 
void DrawPoint (double xc, double yc)
 draw single point
 
virtual void DeviceDrawAnnotation (const wxString &text, wxCoord x, wxCoord y, const wxFont &font)
 text drawn in device coordinates
 
- Public Member Functions inherited from a2dDrawer2D
 a2dDrawer2D (int width=0, int height=0)
 constructor More...
 
 a2dDrawer2D (const wxSize &size)
 constructor More...
 
 a2dDrawer2D (const a2dDrawer2D &other)
 copy constructor
 
virtual ~a2dDrawer2D ()
 destructor
 
void SetDisplay (wxWindow *window)
 the display
 
void SetPrimitiveThreshold (wxUint16 pixels, bool asrect=true)
 set at what size to stop drawing
 
wxUint16 GetPrimitiveThreshold () const
 get drawing threshold More...
 
bool GetThresholdDrawRectangle () const
 underneath the threshold draw a rectangle instead of the real object.
 
void SetPolygonFillThreshold (wxUint16 pixels)
 set threshold at which polygon is drawn filled or only outline
 
wxUint16 GetPolygonFillThreshold () const
 get threshold at which polygon is drawn filled or only outline
 
void SetDisplayAberration (double aber)
 Set the display aberration of curved shapes. More...
 
double GetDisplayAberration () const
 Returns the display aberration of curved shapes. More...
 
void BlitBuffer ()
 blit whole buffer to device
 
void BlitBuffer (int x, int y, int width, int height, int xbuf=0, int ybuf=0)
 blit given rect contents within buffer to device
 
bool GetYaxis () const
 get y axis orientation
 
virtual void SetYaxis (bool up)
 set if the Yaxis goes up or down
 
void SetMappingDeviceRect (int mapx, int mapy, int mapWidth, int mapHeight, bool remap=false)
 to change the default mapping (to the complete buffer). More...
 
virtual void SetMappingWidthHeight (double vx1, double vy1, double width, double height)
 Give the virtual size to be displayed, the mapping matrix will be calculated. More...
 
void SetMappingWidthHeight (const a2dBoundingBox &box)
 Give the virtual size to be displayed, the mapping matrix will be calculated. More...
 
void SetMappingUpp (double vx1, double vy1, double xpp, double ypp)
 Give the virtual size to be displayed, the mapping matrix will be calculated. More...
 
double GetUppX () const
 return xpp Number of user units per pixel in x
 
double GetUppY () const
 return ypp Number of user units per pixel in y
 
void SetMinX (double x)
 Set Minimal X of the visible part in world coordinates.
 
void SetMinY (double y)
 Set Minimal Y of the visible part in world coordinates.
 
void SetUppX (double x)
 set world units per pixel in X
 
void SetUppY (double y)
 set world units per pixel in Y
 
bool GetVirtualAreaSet () const
 if the virtual area has been set already return true else false. More...
 
void StartRefreshDisplayDisable ()
 when called a mapping change will result not result in a refresh of the m_display. More...
 
void EndRefreshDisplayDisable ()
 see StartRefreshDisplayDisable()
 
bool GetRefreshDisplayDisable () const
 see StartRefreshDisplayDisable()
 
int GetWidth () const
 get buffer/device width
 
int GetHeight () const
 get buffer/device height
 
int GetMapWidth () const
 get mapping to device width
 
int GetMapHeight () const
 get mapping to device height
 
int GetMapX () const
 X mapping position in device coordinates.
 
int GetMapY () const
 Y mapping position in device coordinates.
 
double GetVisibleMinX () const
 get Minimal X of the visible part in world coordinates
 
double GetVisibleMinY () const
 get Minimal X of the visible part in world coordinates
 
virtual double GetVisibleMaxX () const
 get Maximum X of the visible part in world coordinates
 
virtual double GetVisibleMaxY () const
 get Maximum Y of the visible part in world coordinates
 
virtual double GetVisibleWidth () const
 get Width of visible part in world coordinates
 
virtual double GetVisibleHeight () const
 get Height of visible part in world coordinates
 
a2dBoundingBox GetVisibleBbox () const
 get visible area as a boundingbox in world coordinates
 
wxRect ToDevice (const a2dBoundingBox &bbox)
 convert the bounding box in world coordinates to device coordinates and return that rectangle.
 
a2dBoundingBox ToWorld (const wxRect &rect)
 convert the rect in device coordinates to a bounding box in world coordinates and return that boundingbox.
 
double DeviceToWorldX (double x) const
 convert x from device to world coordinates
 
double DeviceToWorldY (double y) const
 convert y from device to world coordinates
 
double DeviceToWorldXRel (double x) const
 convert x relative from device to world coordinates More...
 
double DeviceToWorldYRel (double y) const
 convert y relative from device to world coordinates More...
 
int WorldToDeviceX (double x) const
 convert x from world to device coordinates
 
int WorldToDeviceY (double y) const
 convert y from world to device coordinates
 
int WorldToDeviceXRel (double x) const
 convert x relative from world to device coordinates More...
 
int WorldToDeviceYRel (double y) const
 convert y relative from world to device coordinates More...
 
double WorldToDeviceXRelNoRnd (double x) const
 convert x relative from world to device coordinates (result not rounded to integer) More...
 
double WorldToDeviceYRelNoRnd (double y) const
 convert y relative from world to device coordinates (result not rounded to integer) More...
 
const a2dAffineMatrixGetMappingMatrix ()
 get the world-to-device (aka mapping) matrix
 
void SetMappingMatrix (const a2dAffineMatrix &mapping)
 
virtual void SetTransform (const a2dAffineMatrix &userToWorld)
 set user-to-world transform matrix. More...
 
const a2dAffineMatrixGetTransform () const
 get the user-to-world transform matrix. More...
 
const a2dAffineMatrixGetUserToDeviceTransform () const
 get matrix which transforms directly from user coordinates to device
 
virtual void PushTransform ()
 Save the current user-to-world transform on the affine stack.
 
virtual void PushIdentityTransform ()
 push no transform, to draw directly in device coordinates
 
virtual void PushTransform (const a2dAffineMatrix &affine)
 Save the current transform on the affine stack and then multiply it by the given affine. More...
 
virtual void PopTransform (void)
 Recall the previously saved user-to-world transform off the matrix stack.
 
void SetSplineAberration (double aber)
 Set the detail level for spline drawing. More...
 
void SetDrawerStroke (const a2dStroke &stroke)
 Used to set the current stroke. More...
 
a2dStroke GetDrawerStroke () const
 get the current stroke
 
void SetDrawerFill (const a2dFill &fill)
 Used to set the current fill. More...
 
a2dFill GetDrawerFill () const
 get the current fill
 
void SetFont (const a2dFont &font)
 set font to use for drawing text
 
a2dFont GetFont () const
 get font used for drawing text
 
void SetNormalizedFont (bool forceNormalizedFont)
 Use a fixed device height for drawing text.
 
bool GetNormalizedFont ()
 Get setting for a fixed device height for drawing text.
 
void SetSmallTextThreshold (wxUint16 pixels)
 
wxUint16 GetSmallTextThreshold () const
 See SetSmallTextThreshold.
 
virtual void DrawPolygon (a2dVertexArray *points, bool spline=false, wxPolygonFillMode fillStyle=wxODDEVEN_RULE)
 Draw polygon in world coordinates using pointarray.
 
virtual void DrawLines (a2dVertexArray *points, bool spline=false)
 Draw polyline in world coordinates using pointarray.
 
virtual void DrawLines (const a2dVertexList *list, bool spline=false)
 Draw polyline in world coordinates using pointlist.
 
virtual void DrawArc (double x1, double y1, double x2, double y2, double xc, double yc, bool chord)
 Draw Arc in world coordinates.
 
virtual void DrawEllipticArc (double xc, double yc, double width, double height, double sa, double ea, bool chord)
 Draw Elliptic Arc in world coordinates.
 
virtual void DrawCenterRoundedRectangle (double xc, double yc, double width, double height, double radius, bool pixelsize=false)
 Draw CenterRoundedRectangle in world coordinates. More...
 
void DrawImage (const wxImage &image, double x=0, double y=0, wxUint8 Opacity=255)
 Draw wxImage in world coordinates. More...
 
void SetRealScale (bool realScale)
 If true use real scale else different scale by x and y.
 
virtual void DrawText (const wxString &text, double x, double y, int alignment=wxMINX|wxMINY, bool Background=true)
 Draw text in user coordinates. More...
 
void SetDrawStyle (a2dDrawStyle drawstyle)
 set drawstyle to use for drawing, More...
 
a2dDrawStyle GetDrawStyle () const
 get drawstyle used for drawing.
 
void SetPrintMode (bool onOff)
 to modify drawing feature when used as context for printing
 
void OverRuleFixedStyle ()
 id style is FIXED, saves current style and sets style to a2dFILLED
 
void ResetFixedStyle ()
 only way to reset style after SetDrawStyle( a2dFIXED*** );
 
void ReStoreFixedStyle ()
 when fixed drawing style is set, it can be overruled. More...
 
void SetDisableDrawing (bool disableDrawing)
 when set, all drawing functions return immediately. More...
 
bool GetDisableDrawing ()
 see SetDisableDrawing()
 
void GetClippingBox (double &x, double &y, double &w, double &h) const
 what is the current clipping region in world coordinates
 
a2dBoundingBoxGetClippingBox ()
 what is the current clipping region in world coordinates
 
void GetClippingMinMax (double &xmin, double &ymin, double &xmax, double &ymax) const
 what is the current clipping region in world coordinates
 
wxRect & GetClippingBoxDev ()
 what is the current clipping region in device coordinates
 
void GetClippingBoxDev (int &x, int &y, int &w, int &h) const
 what is the current clipping region in device coordinates
 
void Init ()
 Initialize a drawer.
 
void SetOpacityFactor (wxUint8 OpacityFactor)
 when enabling m_useOpacityFactor, this is how transparent More...
 
wxUint8 GetOpacityFactor ()
 see SetOpacityFactor()
 
virtual bool HasAlpha ()
 does a derived drawer have alpha support or not
 
void DrawCharStrokeCb (wxChar c)
 Wrapper for DrawCharStroke. More...
 
void DrawCharFreetypeCb (wxChar c)
 Wrapper for DrawCharFreetype. More...
 
void DrawCharDcCb (wxChar c)
 Wrapper for DrawCharDc. More...
 

Protected Member Functions

virtual void DrawTextFreetype (const wxString &text, double x, double y)
 Draw text in world coordinates, based on a freetype font .
 
void DrawCharFreetype (wxColour col, wxChar c, int x, int y, FT_Matrix trans_matrix, FT_Vector vec)
 draw one character into screen buffer, at the position (x,y). More...
 
virtual void DrawCharFreetype (wxChar c)
 Draw a freetype character. More...
 
virtual void DrawPolygon (const a2dVertexList *list, bool spline=false, wxPolygonFillMode fillStyle=wxODDEVEN_RULE)
 Draw polygon in world coordinates using pointlist.
 
virtual void DeviceDrawPolygon (unsigned int n, bool spline, wxPolygonFillMode fillStyle)
 draw an internal polygon in device coordinates More...
 
- Protected Member Functions inherited from a2dDcDrawer
virtual void DoSetDrawStyle (a2dDrawStyle drawstyle)
 
void DoSetActiveStroke ()
 per drawer implementation
 
void DoSetActiveFill ()
 per drawer implementation
 
virtual void DeviceDrawLines (unsigned int n, bool spline)
 draw an internal polyline in device coordinates
 
void DeviceDrawLine (double x1, double y1, double x2, double y2)
 draw in pixels
 
void DeviceDrawHorizontalLine (int x1, int y1, int x2, bool use_stroke_color)
 Draw a pixel-width, unstroked horizontal line in device (pixel) coordinates. More...
 
void DeviceDrawVerticalLine (int x1, int y1, int y2, bool use_stroke_color)
 Draw a pixel-width, unstroked vertical line in device (pixel) coordinates. More...
 
void DeviceDrawPixel (int x1, int y1, unsigned char r, unsigned char g, unsigned char b, unsigned char a)
 draw a single, unstroked pixel in device coordinates with the given color
 
void DeviceDrawBitmap (const wxBitmap &bmp, double x, double y, bool useMask=false)
 in pixels
 
void SetLogicalFunction (wxRasterOperationMode function)
 
virtual void DrawCharDc (wxChar c)
 Draw a dc character. More...
 
virtual void DrawTextDc (const wxString &text, double x, double y)
 Draw text in user coordinates, based on a dc font .
 
- Protected Member Functions inherited from a2dDrawer2D
virtual void SetActiveStroke (const a2dStroke &stroke)
 sync with actual API graphical context More...
 
virtual void SetActiveFill (const a2dFill &fill)
 sync with actual API graphical context More...
 
virtual void DoSetActiveFont (const a2dFont &font)
 
wxPen ConvertActiveToPen ()
 get active stroke as wxPen
 
wxBrush ConvertActiveToBrush ()
 get active fill as wxBrush
 
bool IsStrokeOnly ()
 wxART2D_USE_GRAPHICS_CONTEXT More...
 
bool IsStroked ()
 
int ToDeviceLines (a2dVertexArray *points, a2dBoundingBox &devbbox, bool &smallPoly, bool replaceByRectangle=false)
 convert vertex array containing line and arc segments in user coordinates to device coordinate lines.
 
int ToDeviceLines (const a2dVertexList *list, a2dBoundingBox &devbbox, bool &smallPoly, bool replaceByRectangle=false)
 convert vertex list containing line and arc segments in user coordinates to device coordinate lines.
 
void SetMappingUpp (double x, double y, double wx, double wy, double vx1, double vy1, double xpp, double ypp)
 Given the rectangle in world coordinate to be displayed, update the mappingmatrix. More...
 
unsigned int ConvertSplinedPolygon2 (unsigned int n)
 converts internal device points array to spline. Returns new number of points.
 
unsigned int ConvertSplinedPolyline2 (unsigned int n)
 converts internal device points array to spline. Returns new number of points.
 
bool Clipping (double &x1, double &y1, double &x2, double &y2)
 clip lines
 
int GetClipCode (double x, double y)
 clip code of a point
 
void FillPolygon (int n, wxRealPoint points[])
 Used for filling with Gradient fill style.
 
bool MoveUp (int n, wxRealPoint points[], double horline, int &index, int direction)
 Used for filling with Gradient fill style.
 
void DetectCriticalPoints (int n, wxRealPoint points[])
 Used for filling with Gradient fill style.
 
void DrawTextGeneric (const wxString &text, double x, double y, void(a2dDrawer2D::*drawchar)(wxChar))
 
virtual void DrawCharUnknown (wxChar c)
 Draw a cross instead of a character.
 
virtual void DrawTextUnknown (const wxString &text, double x, double y, bool words=false)
 Draw a cross, indicating an unsupported font type for this drawer. More...
 
virtual void DrawCharStroke (wxChar c)
 Draw a stroke character. More...
 
virtual void DrawTextStroke (const wxString &text, double x, double y)
 Draw text in user coordinates, based on a stroke font. More...
 
wxPoint * _convertToIntPointCache (int n, wxRealPoint *pts)
 Convert double points to integer coords in the point cache and return pointer.
 

Protected Attributes

wxBitmap m_buffer
 the buffer that is used for rendering
 
wxMemoryDC * m_memdc
 Created at BeginDraw, and destoyed at EndDraw, used to actually draw.
 
wxMemoryDC m_mdc1
 
wxMemoryDC m_mdc2
 
- Protected Attributes inherited from a2dDcDrawer
wxDC * m_renderDC
 The DC to use to draw to the device or buffer ( depends on type of a2dCanvasView ) More...
 
wxClientDC * m_deviceDC
 wxDc to draw or blit to the device More...
 
bool m_externalDc
 when dc is set from the outside, this is true.
 
- Protected Attributes inherited from a2dDrawer2D
bool m_frozen
 buffer updating activity possible or not
 
bool m_mouseevents
 enable/ disable mouse events handling by canvas
 
a2dStroke m_currentstroke
 used while rendering
 
a2dFill m_currentfill
 used while rendering
 
a2dStroke m_activestroke
 used while rendering
 
a2dFill m_activefill
 used while rendering
 
a2dFont m_currentfont
 current font set
 
a2dDrawStyle m_drawstyle
 drawstyle (like invert mode)
 
a2dStroke m_fixStrokeRestore
 used to restore an overruled fix style
 
a2dFill m_fixFillRestore
 used to restore an overruled fix style
 
a2dDrawStyle m_fixDrawstyle
 used to restore an overruled fix style
 
bool m_yaxis
 up or down
 
double m_virt_minX
 virtual coordinates box its miminum X
 
double m_virt_minY
 virtual coordinates box its miminum Y
 
double m_xpp
 user units per pixel in x
 
double m_ypp
 user units per pixel in y
 
bool m_fixedStyledOverRuled
 keep track of this
 
bool m_forceNormalizedFont
 up or down
 
wxUint16 m_smallTextThreshold
 
bool m_pendingSig_changedZoom
 When display refresh is on hold, this triggers a delayed zoom signal, when released.
 
a2dVertexList m_tempPoints
 used internally in some methods to avoid constructor, new, ...
 
wxUint8 m_StrokeOpacityCol1
 active stroke alpha
 
wxUint8 m_StrokeOpacityCol2
 active stroke alpha
 
wxUint8 m_FillOpacityCol1
 active fill alpha
 
wxUint8 m_FillOpacityCol2
 active fill alpha
 
unsigned char m_colour1redStroke
 active stroke colours
 
unsigned char m_colour1greenStroke
 active stroke colours
 
unsigned char m_colour1blueStroke
 active stroke colours
 
unsigned char m_colour1redFill
 active fill colours
 
unsigned char m_colour1greenFill
 active fill colours
 
unsigned char m_colour1blueFill
 active fill colours
 
unsigned char m_colour2redFill
 active fill colours
 
unsigned char m_colour2greenFill
 active fill colours
 
unsigned char m_colour2blueFill
 active fill colours
 
a2dAffineMatrix m_worldtodevice
 world to device coordinate mapping
 
a2dAffineMatrix m_usertoworld
 pointer to current user-to-world transform matrix
 
a2dAffineMatrix m_usertodevice
 pointer to current user-to-device transform matrix ( so includes mapping matrix )
 
bool m_virtualarea_set
 is the virtual area set already (used during startup)
 
int m_refreshDisplay
 see SetRefreshDisplay()
 
int m_width
 device size width
 
int m_height
 device size height
 
int m_mapX
 X mapping position in device coordinates.
 
int m_mapY
 Y mapping position in device coordinates.
 
int m_mapWidth
 width for mapping in device coordinates
 
int m_mapHeight
 height for mapping in device coordinates
 
a2dCriticalPointList m_CRlist
 critical point list for polygon
 
a2dAETList m_AETlist
 scanline list of intersections with polygon
 
std::vector< wxPoint > m_cpointsInt
 cached array for containing transformed device coordinates (integer)
 
std::vector< wxRealPoint > m_cpointsDouble
 cached array for containing transformed device coordinates (double)
 
double m_splineaberration
 accuracy of spline
 
a2dClipRegionList m_clipregionlist
 pushed clipping regions
 
double m_displayaberration
 accuracy of arc segment calculation etc. in device coordinates
 
wxUint16 m_drawingthreshold
 object smaller than this value will not be rendered
 
wxUint16 m_polygonFillThreshold
 polygon smaller than this value will be rendered non filled.
 
bool m_asrectangle
 underneath the threshold draw rectangles if true else nothing
 
a2dBoundingBox m_clipboxworld
 current clipping area in world coordinates
 
wxRect m_clipboxdev
 current clipping area in device coordinates
 
int m_beginDraw_endDraw
 counter for BeginDraw EndDraw calls
 
wxWindow * m_display
 view its window.
 
bool m_disableDrawing
 all drawing is disabled when this is true
 
wxUint8 m_OpacityFactor
 opacity will be the one set, derived by this
 
std::vector< a2dAffineMatrixm_affineStack
 Affine transform stack. More...
 
bool m_realScale
 If true use real scale else different scale by x and y.
 
bool m_printingMode
 can be used to modify drawing features when used as context for printing
 

Additional Inherited Members

- Static Public Attributes inherited from a2dDrawer2D
static const a2dSignal sig_changedZoom = wxNewId()
 

Detailed Description

This class implements drawing functions for wxDC based drawing.

It uses a bitmap buffer to do double buffering. See a2dCanvasView class for more documentation. To start drawing you must call BeginDraw at when stopping drawing you must call EndDraw. This will takes care of setting and releasing the wxMemoryDC used internal, and keeps your code "a2dCanvasView type" independent.

See Also
class: a2dCanvas
class: a2dRenderImage

Definition at line 203 of file dcdrawer.h.

Member Function Documentation

void a2dMemDcDrawer::DeviceDrawPolygon ( unsigned int  n,
bool  spline,
wxPolygonFillMode  fillStyle 
)
protectedvirtual

draw an internal polygon in device coordinates

todo m_activestroke->Render( this, m_clipboxworld, n + 1, copy );

Reimplemented from a2dDcDrawer.

Definition at line 2525 of file dcdrawer.cpp.

void a2dMemDcDrawer::DrawCharFreetype ( wxColour  col,
wxChar  c,
int  dx,
int  dy,
FT_Matrix  trans_matrix,
FT_Vector  vec 
)
protected

draw one character into screen buffer, at the position (x,y).

Bug:
EW: DrawCharFreetype crashes when zoomed in extremely far.

Definition at line 3214 of file dcdrawer.cpp.

void a2dMemDcDrawer::DrawCharFreetype ( wxChar  c)
protectedvirtual

Draw a freetype character.

This is an internal function, used by DrawTextFreetype This function assumes that the affine matrix has been set up by the calling function in such a way, that the (0,0) coordinate will match with the lowerleft bbox corner of the character. Also mirroring should be performed by the calling function.

Reimplemented from a2dDcDrawer.

Definition at line 3166 of file dcdrawer.cpp.

void a2dMemDcDrawer::DrawImage ( const wxImage &  image,
double  x,
double  y,
double  width,
double  height,
wxUint8  Opacity = 255 
)
virtual

Draw a wxImage in world coordinates.

Use AggDrawer when available.

Reimplemented from a2dDcDrawer.

Definition at line 2662 of file dcdrawer.cpp.


The documentation for this class was generated from the following files:
a2dMemDcDrawer Class Reference -- Sun Oct 12 2014 17:04:43 -- Sun Oct 12 2014 -- 1.8.5 -- wxArt2D -- . -- Main Page Reference Documentation