#include <painter.h>
Public Types | |
| enum | Mode { OP_REPLACE, OP_AND, OP_OR, OP_XOR } |
| behaviour of painting primtives More... | |
Public Member Functions | |
| Painter (Surface *surf=0) | |
constructor - bind this Painter to the surf Surface | |
| bool | empty () const |
| void | setColor (const Color &col) |
| set the active (default) Color | |
| void | setFilling (bool flag) |
| set fill mode for boxes, circles and other closed primitives on/off | |
| void | setMode (Mode mode) |
| set drawing Mode for overlapping primitives | |
| void | setSurface (Surface *surf) |
| set the target Surface. | |
| void | setPixel (const Point &pt, const Color &col) |
| Set a pixel on the Surface to given Color. | |
| Color | getPixel (const Point &pt) |
| fetch the Color of pixel | |
| void | hLine (const Point &p1, const Point &p2) |
| Draw a horizontal line on the target Surface using the default Color. | |
| void | vLine (const Point &p1, const Point &p2) |
| Draw a vertical line on the target Surface using the default Color. | |
| void | line (const Point &p1, const Point &p2) |
| Draw a diagonal line on the target Surface using the default Color. | |
| void | hLine (const Point &p1, const Point &p2, const Color &col) |
| Draw a horizontal line on the target Surface. | |
| void | vLine (const Point &p1, const Point &p2, const Color &col) |
| Draw a vertical line on the target Surface. | |
| void | line (const Point &p1, const Point &p2, const Color &col) |
| Draw a diagonal line on the target Surface. | |
| void | circle (const Point &c, unsigned int r, unsigned int t=1) |
| Draw a circle on the target Surface, using the default Color. | |
| void | ellipse (const Point &c, unsigned int rx, unsigned int ry, unsigned int t=1) |
| Draw an ellipse on the target Surface, using the default Color. | |
| void | box (const Point &p1, const Point &p2) |
| Draw a box (rectangle) on the target Surface, using the default Color. | |
| void | trigon (const Point &p1, const Point &p2, const Point &p3) |
| Draw a triangle on the target Surface, using the default Color. | |
| void | trigon (const Point &p1, const Point &p2, const Point &p3, const Color &c) |
| Draw a triangle on the target Surface. | |
| void | shadedTrigon (const Point &d1, const Point &d2, const Point &d3, const Color &c1, const Color &c2, const Color &c3) |
| Draw a filled triangle on the target Surface. | |
| void | texturedTrigon (const Point &d1, const Point &d2, const Point &d3, const Point &s1, const Point &s2, const Point &s3, Surface *texture) |
| Draw a textured triangle to the target Surface. | |
|
|
behaviour of painting primtives
|
|
||||||||||||
|
Draw a box (rectangle) on the target Surface, using the default Color.
|
|
||||||||||||||||
|
Draw a circle on the target Surface, using the default Color.
|
|
||||||||||||||||||||
|
Draw an ellipse on the target Surface, using the default Color.
|
|
|
fetch the Color of pixel
|
|
||||||||||||||||
|
Draw a horizontal line on the target Surface.
|
|
||||||||||||
|
Draw a horizontal line on the target Surface using the default Color.
|
|
||||||||||||||||
|
Draw a diagonal line on the target Surface. This method calls vLine or hLine if possible, or uses a bresenham calculation to rasterize the diagonal line if necessary.
|
|
||||||||||||
|
Draw a diagonal line on the target Surface using the default Color. This method calls vLine or hLine if possible, or uses a bresenham calculation to rasterize the diagonal line if necessary.
|
|
||||||||||||
|
Set a pixel on the Surface to given Color.
|
|
||||||||||||||||||||||||||||
|
Draw a filled triangle on the target Surface. Vertex colors are blended into each other across the bitmap.
|
|
||||||||||||||||||||||||||||||||
|
Draw a textured triangle to the target Surface.
|
|
||||||||||||||||||||
|
Draw a triangle on the target Surface.
|
|
||||||||||||||||
|
Draw a triangle on the target Surface, using the default Color.
|
|
||||||||||||||||
|
Draw a vertical line on the target Surface.
|
|
||||||||||||
|
Draw a vertical line on the target Surface using the default Color.
|
This document is licensed under the terms of the GNU Free Documentation License and may be freely distributed under the conditions given by this license.