25 #ifndef TBX_OFFSETGRAPHICS_H
26 #define TBX_OFFSETGRAPHICS_H
28 #include "osgraphics.h"
29 #include "visiblearea.h"
101 void offset(
const Point &new_offset) {_offset_x = new_offset.
x; _offset_y = new_offset.
y;}
132 thickness, cap_and_join, dashes);
138 thickness, cap_and_join, dashes);
OffsetGraphics()
Construct with no offset.
Definition: offsetgraphics.h:46
DrawFillStyle
Enumeration to set the fill style when filling shapes.
Definition: drawpath.h:40
virtual int logical_y(int os_y) const
Convert from OS units to logical y value.
Definition: offsetgraphics.h:112
int x
Definition: point.h:59
virtual void fill(const Point &pt, const DrawPath &path, DrawFillStyle fill_style=WINDING_NON_ZERO, int flatness=1)
Fill a draw path.
Definition: offsetgraphics.h:127
Class to represent, display and manipulate a graphical path used by the Draw RISC OS module...
Definition: drawpath.h:464
void offset_x(int new_x)
Set the horizontal offset.
Definition: offsetgraphics.h:70
virtual int os_y(int logical_y) const
Convert from logical y value to OS units.
Definition: offsetgraphics.h:110
Class to represent a two dimensional bounding box.
Definition: bbox.h:37
Class to set the cap and joins style for lines that are greater than a single pixel wide...
Definition: drawpath.h:57
OffsetGraphics(const VisibleArea &area)
Construct from a visible area.
Definition: offsetgraphics.h:63
virtual void image(int x, int y, const Image &image)
Draw an image at given location.
Definition: offsetgraphics.h:122
virtual int logical_x(int os_x) const
Convert from OS units to logical x value.
Definition: offsetgraphics.h:111
Point offset() const
Get the offsets as a point.
Definition: offsetgraphics.h:95
int screen_x(int work_x) const
Convert work area x coordinate to screen.
Definition: visiblearea.h:144
void offset(const Point &new_offset)
Set both offsets from a point.
Definition: offsetgraphics.h:101
virtual void stroke(int x, int y, const DrawPath &path, DrawFillStyle fill_style=WINDING_NON_ZERO, int flatness=1, int thickness=0, DrawCapAndJoin *cap_and_join=0, DrawDashPattern *dashes=0)
Draw lines of a draw path at the given location.
Definition: offsetgraphics.h:128
virtual void plot(int code, int x, int y)
Execute the OS_Plot swi.
Definition: osgraphics.cc:65
virtual void text(int x, int y, const std::string &text)
Draw text in current desktop font.
Definition: offsetgraphics.h:118
virtual void path(const Point *points, int num)
Draw a line through the specified points.
Definition: osgraphics.cc:296
virtual void image(int x, int y, const Image &image)
Draw an image at given location.
Definition: osgraphics.cc:397
Point min
Minimum coordinate of the bounding box.
Definition: bbox.h:68
int y
Definition: point.h:60
virtual void text(int x, int y, const std::string &text)
Draw text in current desktop font.
Definition: osgraphics.cc:363
Base class image classes providing a consistent interface to plot the to the screen.
Definition: image.h:44
virtual BBox logical(const BBox &b)
Convert from OS units to logical coordinates.
Definition: offsetgraphics.h:116
Class to represent a dash pattern for lines.
Definition: drawpath.h:225
virtual void stroke(const Point &pt, const DrawPath &path, DrawFillStyle fill_style=WINDING_NON_ZERO, int flatness=1, int thickness=0, DrawCapAndJoin *cap_and_join=0, DrawDashPattern *dashes=0)
Plot the lines in a path.
Definition: offsetgraphics.h:134
non-zero winding number rule.
Definition: drawpath.h:42
Class to represent a position in two dimensional space.
Definition: point.h:36
virtual void text(int x, int y, const std::string &text, const Font &font)
Draw text in given font.
Definition: offsetgraphics.h:119
virtual void plot(int code, int x, int y)
Execute the OS_Plot swi.
Definition: offsetgraphics.h:104
virtual void stroke(int x, int y, const DrawPath &path, DrawFillStyle fill_style=WINDING_NON_ZERO, int flatness=1, int thickness=0, DrawCapAndJoin *cap_and_join=0, DrawDashPattern *dashes=0)
Draw lines of a draw path at the given location.
Definition: osgraphics.cc:416
virtual BBox os(const BBox &b)
Convert from logical coordinates to OS units.
Definition: offsetgraphics.h:115
Class to store information for the Visible area of a window and provide work area to screen conversio...
Definition: visiblearea.h:36
void offset_y(int new_y)
Set the vertical offset.
Definition: offsetgraphics.h:82
virtual void fill(int x, int y, const DrawPath &path, DrawFillStyle fill_style=WINDING_NON_ZERO, int flatness=1)
Fill an draw path at the given location.
Definition: osgraphics.cc:405
Point max
Maximum coordinate of the bounding box.
Definition: bbox.h:72
virtual Point logical(const Point &pt)
Convert from OS units to logical coordinates.
Definition: offsetgraphics.h:114
int offset_y() const
Get the vertical offset.
Definition: offsetgraphics.h:88
Class to draw to graphics to the screen using standard OS routines with no translation or scaling...
Definition: osgraphics.h:36
virtual void fill(int x, int y, const DrawPath &path, DrawFillStyle fill_style=WINDING_NON_ZERO, int flatness=1)
Fill an draw path at the given location.
Definition: offsetgraphics.h:126
Class to draw to graphics to the screen using standard OS routines off setting the coordinates given...
Definition: offsetgraphics.h:37
Class to handle painting and measuring text using an outline font.
Definition: font.h:60
int screen_y(int work_y) const
Convert work area y coordinate to screen area.
Definition: visiblearea.h:149
virtual void image(const Point &pt, const Image &im)
Draw an image.
Definition: offsetgraphics.h:123
OffsetGraphics(int offset_x, int offset_y)
Construct with given offsets.
Definition: offsetgraphics.h:53
virtual int os_x(int logical_x) const
Convert from logical x value to OS units.
Definition: offsetgraphics.h:109
int offset_x() const
Get the horizontal offset.
Definition: offsetgraphics.h:76
virtual Point os(const Point &pt)
Convert from logical coordinates to OS units.
Definition: offsetgraphics.h:113