a2dMemDcDrawer Class Reference
[classes used for drawing with a2dDrawer2D]

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]

List of all members.

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.
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

Protected Member Functions

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

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.


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::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 2573 of file dcdrawer.cpp.


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