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);
int x
Definition: point.h:59
Class to represent a dash pattern for lines.
Definition: drawpath.h:226
Class to set the cap and joins style for lines that are greater than a single pixel wide.
Definition: drawpath.h:58
A library for creating RISC OS toolbox applications.
Definition: abouttobeshownlistener.cc:35
virtual int logical_x(int os_x) const
Convert from OS units to logical x value.
Definition: offsetgraphics.h:111
Class to represent, display and manipulate a graphical path used by the Draw RISC OS module.
Definition: drawpath.h:465
int offset_x() const
Get the horizontal offset.
Definition: offsetgraphics.h:76
int screen_y(int work_y) const
Convert work area y coordinate to screen area.
Definition: visiblearea.h:149
Class to handle painting and measuring text using an outline font.
Definition: font.h:61
Point offset() const
Get the offsets as a point.
Definition: offsetgraphics.h:95
virtual void text(int x, int y, const std::string &text, const Font &font)
Draw text in given font.
Definition: offsetgraphics.h:119
virtual int os_y(int logical_y) const
Convert from logical y value to OS units.
Definition: offsetgraphics.h:110
virtual Point os(const Point &pt) const
Convert from logical coordinates to OS units.
Definition: offsetgraphics.h:113
virtual void image(int x, int y, const Image &image)
Draw an image at given location.
Definition: osgraphics.cc:397
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: offsetgraphics.h:126
virtual void plot(int code, int x, int y)
Execute the OS_Plot swi.
Definition: osgraphics.cc:65
Class to store information for the Visible area of a window and provide work area to screen conversio...
Definition: visiblearea.h:37
virtual Point logical(const Point &pt) const
Convert from OS units to logical coordinates.
Definition: offsetgraphics.h:114
OffsetGraphics()
Construct with no offset.
Definition: offsetgraphics.h:46
virtual int logical_y(int os_y) const
Convert from OS units to logical y value.
Definition: offsetgraphics.h:112
@ WINDING_NON_ZERO
non-zero winding number rule.
Definition: drawpath.h:42
virtual int os_x(int logical_x) const
Convert from logical x value to OS units.
Definition: offsetgraphics.h:109
Point min
Minimum coordinate of the bounding box.
Definition: bbox.h:68
virtual BBox os(const BBox &b) const
Convert from logical coordinates to OS units.
Definition: offsetgraphics.h:115
int y
Definition: point.h:60
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 void text(int x, int y, const std::string &text)
Draw text in current desktop font.
Definition: osgraphics.cc:363
virtual BBox logical(const BBox &b) const
Convert from OS units to logical coordinates.
Definition: offsetgraphics.h:116
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:37
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
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
Class to represent a two dimensional bounding box.
Definition: bbox.h:38
virtual void path(const Point *points, int num)
Draw a line through the specified points.
Definition: osgraphics.cc:296
OffsetGraphics(const VisibleArea &area)
Construct from a visible area.
Definition: offsetgraphics.h:63
Base class image classes providing a consistent interface to plot the to the screen.
Definition: image.h:45
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
Point max
Maximum coordinate of the bounding box.
Definition: bbox.h:72
virtual void plot(int code, int x, int y)
Execute the OS_Plot swi.
Definition: offsetgraphics.h:104
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
void offset_x(int new_x)
Set the horizontal offset.
Definition: offsetgraphics.h:70
Class to represent a position in two dimensional space.
Definition: point.h:37
DrawFillStyle
Enumeration to set the fill style when filling shapes.
Definition: drawpath.h:41
int screen_x(int work_x) const
Convert work area x coordinate to screen.
Definition: visiblearea.h:144
OffsetGraphics(int offset_x, int offset_y)
Construct with given offsets.
Definition: offsetgraphics.h:53
virtual void image(const Point &pt, const Image &im)
Draw an image.
Definition: offsetgraphics.h:123
virtual void text(int x, int y, const std::string &text)
Draw text in current desktop font.
Definition: offsetgraphics.h:118
virtual void image(int x, int y, const Image &image)
Draw an image at given location.
Definition: offsetgraphics.h:122
Class to draw to graphics to the screen using standard OS routines off setting the coordinates given.
Definition: offsetgraphics.h:38