#include <drawer2d.h>


Public Member Functions | |
| a2dBlindDrawer2D (int w=100, int h=100) | |
| Drawer having a buffer of w pixel wide and h pixels heigh. | |
| a2dBlindDrawer2D (const wxSize &size) | |
| Drawer having a buffer of w pixel wide and h pixels height given by size. | |
| void | SetBufferSize (int w, int h) |
| set buffer size to w pixel wide and h pixels heigh | |
| wxBitmap | GetBuffer () const |
| Return the buffer as a bitmap. | |
| wxBitmap | GetSubBitmap (wxRect sub_rect) const |
| get part of the buffer given a rect | |
| virtual | ~a2dBlindDrawer2D () |
| destructor | |
| a2dBlindDrawer2D (const a2dBlindDrawer2D &other) | |
| copy constructor | |
| a2dBlindDrawer2D (const a2dDrawer2D &other) | |
| 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. | |
| void | ResetStyle () |
| set a pre-defined style reseting cashed values. | |
| 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) | |
| 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 | |
| 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 | DrawPolygon (a2dVertexArray *points, bool spline=false, wxPolygonFillMode fillStyle=wxODDEVEN_RULE) |
| Draw polygon in world coordinates using pointarray. | |
| void | DrawPolygon (const a2dVertexList *list, bool spline=false, wxPolygonFillMode fillStyle=wxODDEVEN_RULE) |
| Draw polygon in world coordinates using pointlist. | |
| void | DrawLines (a2dVertexArray *points, bool spline=false) |
| Draw polyline in world coordinates using pointarray. | |
| void | DrawLines (const a2dVertexList *list, bool spline=false) |
| Draw polyline in world coordinates using pointlist. | |
| void | DrawLine (double x1, double y1, double x2, double y2) |
| Draw line in world coordinates. | |
| void | DrawArc (double x1, double y1, double x2, double y2, double xc, double yc, bool chord) |
| Draw Arc in world coordinates. | |
| void | DrawEllipticArc (double xc, double yc, double width, double height, double sa, double ea, bool chord) |
| Draw Elliptic Arc in world coordinates. | |
| void | DrawRoundedRectangle (double x, double y, double width, double height, double radius, bool pixelsize=false) |
| Draw RoundedRectangle in world coordinates. | |
| void | DrawCenterRoundedRectangle (double xc, double yc, double width, double height, double radius, bool pixelsize=false) |
| Draw CenterRoundedRectangle in world coordinates. | |
| void | DrawCircle (double x, double y, double radius) |
| Draw Circle in world coordinates. | |
| void | DrawEllipse (double x, double y, double width, double height) |
| Draw Ellipse in world coordinates. | |
| void | DrawImage (const wxImage &image, double x, double y, double width, double height, wxUint8 Opacity=255) |
| Draw wxImage in world coordinates. | |
| void | DrawImage (const a2dImageRGBA &image, double x, double y, double width, double height, wxUint8 Opacity=255) |
| void | DrawVpath (const a2dVpath *path) |
| Draw vector path in world coordinates. | |
| void | DrawPoint (double xc, double yc) |
| draw a single point | |
| void | DeviceDrawAnnotation (const wxString &text, wxCoord x, wxCoord y, const wxFont &font) |
| text drawn in device coordinates | |
Protected Member Functions | |
| virtual void | DoSetDrawStyle (a2dDrawStyle drawstyle) |
| void | DoSetActiveStroke () |
| per drawer implementation | |
| void | DoSetActiveFill () |
| per drawer implementation | |
In cases where a drawing context is not really needed to draw, but one still wants to follow the same matrix multiplication as if drawn, this class can be used. It can simplifies the code a lot if there is a dummy drawer instead of non at all, which would require testing for that. A dummy drawer can be used in all cases where normally a real drawer is used.
Definition at line 1218 of file drawer2d.h.
| void a2dBlindDrawer2D::SetBufferSize | ( | int | w, | |
| int | h | |||
| ) | [virtual] |
set buffer size to w pixel wide and h pixels heigh
Implements a2dDrawer2D.
Definition at line 3034 of file drawer2d.cpp.
| void a2dBlindDrawer2D::ResetStyle | ( | ) | [virtual] |
set a pre-defined style reseting cashed values.
setting a style ( stroke fill ) for a a2dDrawer2D, takes into account the style that is currently set for it. If the style being set is equal to the current style, internal nothing is done for the underlying device. Of course this only works if everyone obeys the rules. Routines not using a2dDrawer2D as an entry to device, may fool this trick. Therefore to be sure to start with a proper a2dDrawer2D, first call this function. It will make the a2dDrawer2D style the actual style used on the device.
Reimplemented from a2dDrawer2D.
Definition at line 3067 of file drawer2d.cpp.
| void a2dBlindDrawer2D::ExtendAndPushClippingRegion | ( | a2dVertexList * | points, | |
| bool | spline = false, |
|||
| wxPolygonFillMode | fillStyle = wxODDEVEN_RULE, |
|||
| a2dBooleanClip | clipoperation = a2dCLIP_AND | |||
| ) | [virtual] |
push on stack the current clipping region and extend clipping region
The clipping region will be extended with a polygon to which everything drawn will be clipped.
Implements a2dDrawer2D.
Definition at line 3049 of file drawer2d.cpp.
| void a2dBlindDrawer2D::DrawCenterRoundedRectangle | ( | double | xc, | |
| double | yc, | |||
| double | width, | |||
| double | height, | |||
| double | radius, | |||
| bool | pixelsize = false | |||
| ) | [virtual] |
Draw CenterRoundedRectangle in world coordinates.
Draws a rounded rectangle centered at the point (xc,yc) in world coordinates.
Reimplemented from a2dDrawer2D.
Definition at line 3117 of file drawer2d.cpp.
| void a2dBlindDrawer2D::DrawCircle | ( | double | x, | |
| double | y, | |||
| double | radius | |||
| ) | [virtual] |
Draw Circle in world coordinates.
Reimplemented from a2dDrawer2D.
Definition at line 3125 of file drawer2d.cpp.
| void a2dBlindDrawer2D::DrawEllipse | ( | double | x, | |
| double | y, | |||
| double | width, | |||
| double | height | |||
| ) | [virtual] |
Draw Ellipse in world coordinates.
Reimplemented from a2dDrawer2D.
Definition at line 3129 of file drawer2d.cpp.
| void a2dBlindDrawer2D::DrawImage | ( | const wxImage & | image, | |
| double | x, | |||
| double | y, | |||
| double | width, | |||
| double | height, | |||
| wxUint8 | Opacity = 255 | |||
| ) | [virtual] |
Draw wxImage in world coordinates.
Draw the wxImage to the screen in such a manner that the image is mapped into the rectangle defined by points (x-width/2,y-width/2) and (x+width/2,y+height/2) in world coordinates, with the center of the image at (x,y).
| image | image to draw | |
| x | world x position of center of image | |
| y | world y position of center of image | |
| width | width in world coordinates to map width of image to | |
| height | height in world coordinates to map height of image to |
Implements a2dDrawer2D.
Definition at line 3081 of file drawer2d.cpp.