Class to draw to graphics to the screen using standard OS routines off setting the coordinates given.
More...
|
| OffsetGraphics () |
| Construct with no offset.
|
|
| OffsetGraphics (int offset_x, int offset_y) |
| Construct with given offsets. More...
|
|
| OffsetGraphics (const VisibleArea &area) |
| Construct from a visible area. More...
|
|
void | offset_x (int new_x) |
| Set the horizontal offset. More...
|
|
int | offset_x () const |
| Get the horizontal offset. More...
|
|
void | offset_y (int new_y) |
| Set the vertical offset. More...
|
|
int | offset_y () const |
| Get the vertical offset. More...
|
|
Point | offset () const |
| Get the offsets as a point. More...
|
|
void | offset (const Point &new_offset) |
| Set both offsets from a point. More...
|
|
virtual void | plot (int code, int x, int y) |
| Execute the OS_Plot swi. More...
|
|
virtual int | os_x (int logical_x) const |
| Convert from logical x value to OS units. More...
|
|
virtual int | os_y (int logical_y) const |
| Convert from logical y value to OS units. More...
|
|
virtual int | logical_x (int os_x) const |
| Convert from OS units to logical x value. More...
|
|
virtual int | logical_y (int os_y) const |
| Convert from OS units to logical y value. More...
|
|
virtual Point | os (const Point &pt) |
| Convert from logical coordinates to OS units. More...
|
|
virtual Point | logical (const Point &pt) |
| Convert from OS units to logical coordinates. More...
|
|
virtual BBox | os (const BBox &b) |
| Convert from logical coordinates to OS units. More...
|
|
virtual BBox | logical (const BBox &b) |
| Convert from OS units to logical coordinates. More...
|
|
virtual void | text (int x, int y, const std::string &text) |
| Draw text in current desktop font.
|
|
virtual void | text (int x, int y, const std::string &text, const Font &font) |
| Draw text in given font.
|
|
virtual void | image (int x, int y, const Image &image) |
| Draw an image at given location.
|
|
virtual void | image (const Point &pt, const Image &im) |
| Draw an image. More...
|
|
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.
|
|
virtual void | fill (const Point &pt, const DrawPath &path, DrawFillStyle fill_style=WINDING_NON_ZERO, int flatness=1) |
| Fill a draw path. More...
|
|
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.
|
|
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. More...
|
|
| OSGraphics () |
| Create the graphics class with the default plot action of overwrite.
|
|
void | plot_action (PlotAction action) |
| Sets the plot action. More...
|
|
virtual void | foreground (Colour colour) |
| Set foreground graphics colour to the nearest match to the given colour for the current screen mode. More...
|
|
virtual void | background (Colour colour) |
| Set background graphics colour to the nearest match to the given colour for the current screen mode. More...
|
|
virtual void | wimp_foreground (WimpColour colour) |
| Set the graphics foreground colour to the given WIMP colour.
|
|
virtual void | wimp_background (WimpColour colour) |
| Set the graphics background colour to the given WIMP colour.
|
|
virtual void | move (int x, int y) |
| Move graphics position.
|
|
virtual void | point (int x, int y) |
| Draw a single pixel point.
|
|
virtual void | line (int fx, int fy, int tx, int ty) |
| Draw a line betweenn the given coordinates.
|
|
virtual void | line (int x, int y) |
| Draw a line from the current graphics position to the given coordinates.
|
|
virtual void | rectangle (int xmin, int ymin, int xmax, int ymax) |
| Draw outline of a rectangle.
|
|
virtual void | fill_rectangle (int xmin, int ymin, int xmax, int ymax) |
| Fill a rectangle the current foreground colour.
|
|
virtual void | circle (int centre_x, int centre_y, int radius) |
| Draw outline of a circle. More...
|
|
virtual void | fill_circle (int centre_x, int centre_y, int radius) |
| Draw a filled circle. More...
|
|
virtual void | arc (int centre_x, int centre_y, int start_x, int start_y, int end_x, int end_y) |
| Draw arc around a circle. More...
|
|
virtual void | segment (int centre_x, int centre_y, int start_x, int start_y, int end_x, int end_y) |
| Draw a segment of a circle. More...
|
|
virtual void | sector (int centre_x, int centre_y, int start_x, int start_y, int end_x, int end_y) |
| Draw a sector of a circle. More...
|
|
virtual void | ellipse (int centre_x, int centre_y, int intersect_x, int intersect_y, int high_x, int high_y) |
| Draw the outline of an ellipse. More...
|
|
virtual void | fill_ellipse (int centre_x, int centre_y, int intersect_x, int intersect_y, int high_x, int high_y) |
| Draw a filled ellipse. More...
|
|
virtual void | path (const Point *points, int num) |
| Draw a line through the specified points. More...
|
|
virtual void | polygon (const Point *points, int num) |
| Draw outline of a polygon. More...
|
|
virtual void | fill_polygon (const Point *points, int num) |
| Fill a polygon. More...
|
|
virtual void | text_colours (Colour foreground, Colour background) |
| Set the colours for the desktop font.
|
|
virtual void | text_colours (Font &font, Colour foreground, Colour background) |
| Set the colours for the given font.
|
|
void | clear () |
| Clear the current graphics window to the background colour.
|
|
virtual void | move (const Point &point) |
| Move the graphics cursor to the given location. More...
|
|
virtual void | point (const Point &pt) |
| Draw a point at the given location. More...
|
|
virtual void | line (const Point &to_point) |
| Draw a line from the last point visited to the given location. More...
|
|
virtual void | line (const Point &from_point, const Point &to_point) |
| Draw a line between the given two points. More...
|
|
virtual void | rectangle (const Point &min_point, const Point &max_point) |
| Draw the outline of a rectangle. More...
|
|
virtual void | rectangle (const BBox &r) |
| Draw the outline of a rectangle. More...
|
|
virtual void | fill_rectangle (const Point &min_point, const Point &max_point) |
| Draw the outline of a rectangle. More...
|
|
virtual void | fill_rectangle (const BBox &r) |
| Draw a filled rectangle. More...
|
|
virtual void | circle (const Point ¢re_point, int radius) |
| Draw the outline of a circle. More...
|
|
virtual void | fill_circle (const Point ¢re_point, int radius) |
| Draw a filled circle. More...
|
|
virtual void | arc (const Point ¢re_point, const Point &start_point, const Point &end_point) |
| Draw an arc. More...
|
|
virtual void | segment (const Point ¢re_point, const Point &start_point, const Point &end_point) |
| Draw a segment of a circle. More...
|
|
virtual void | sector (const Point ¢re_point, const Point &start_point, const Point &end_point) |
| Draw a sector of a circle. More...
|
|
virtual void | ellipse (const Point ¢re_point, const Point &intersect_point, const Point &high_point) |
| Draw the outline of an ellipse. More...
|
|
virtual void | fill_ellipse (const Point ¢re_point, const Point &intersect_point, const Point &high_point) |
| Draw a filled ellipse. More...
|
|
virtual void | text (const Point &pt, const std::string &str) |
| Draw text at the given location in the current WIMP font. More...
|
|
virtual void | text (const Point &pt, const std::string &str, const Font &font) |
| Draw text at the given location in the given font. More...
|
|
Class to draw to graphics to the screen using standard OS routines off setting the coordinates given.