|
| JPainter (JFontManager *fontManager, const JRect &defaultClipRect) |
|
virtual | ~JPainter () |
|
JFontManager * | GetFontManager () const |
|
virtual void | Reset () |
|
void | Reset (const JRect &defClipRect) |
|
virtual void | ResetAllButClipping () |
|
const JRect & | GetClipRect () const |
|
virtual JRect | SetClipRect (const JRect &r) |
|
void | ResetClipRect () |
|
const JRect & | GetDefaultClipRect () const |
|
void | SetDefaultClipRect (const JRect &r) |
|
const JPoint & | GetOrigin () const |
|
void | SetOrigin (const JCoordinate x, const JCoordinate y) |
|
void | SetOrigin (const JPoint &pt) |
|
void | ShiftOrigin (const JCoordinate dx, const JCoordinate dy) |
|
void | ShiftOrigin (const JPoint &delta) |
|
const JPoint & | GetPenLocation () const |
|
void | SetPenLocation (const JCoordinate x, const JCoordinate y) |
|
void | SetPenLocation (const JPoint &pt) |
|
void | ShiftPenLocation (const JCoordinate dx, const JCoordinate dy) |
|
void | ShiftPenLocation (const JPoint &delta) |
|
JColorID | GetPenColor () const |
|
void | SetPenColor (const JColorID color) |
|
JSize | GetLineWidth () const |
|
void | SetLineWidth (const JSize width) |
|
bool | LinesAreDashed () const |
|
void | DrawDashedLines (const bool on) |
|
bool | GetDashList (const JArray< JSize > **dashList, JSize *dashOffset) const |
|
virtual void | SetDashList (const JArray< JSize > &dashList, const JSize dashOffset=0) |
|
bool | IsFilling () const |
|
void | SetFilling (const bool on) |
|
const JFont & | GetFont () const |
|
void | SetFontName (const JString &name) |
|
void | SetFontSize (const JSize size) |
|
void | SetFontStyle (const JFontStyle &style) |
|
void | SetFont (const JFont &f) |
|
JSize | GetLineHeight (JCoordinate *ascent, JCoordinate *descent) const |
|
JSize | GetLineHeight () const |
|
JSize | GetStringWidth (const JString &str) const |
|
void | String (const JCoordinate left, const JCoordinate top, const JString &str, const JCoordinate width=0, const HAlign hAlign=HAlign::kLeft, const JCoordinate height=0, const VAlign vAlign=VAlign::kTop) |
|
void | String (const JPoint &topLeft, const JString &str, const JCoordinate width=0, const HAlign hAlign=HAlign::kLeft, const JCoordinate height=0, const VAlign vAlign=VAlign::kTop) |
|
void | String (const JRect &rect, const JString &str, const HAlign hAlign=HAlign::kLeft, const VAlign vAlign=VAlign::kTop) |
|
virtual void | String (const JFloat angle, const JCoordinate left, const JCoordinate top, const JString &str, const JCoordinate width=0, const HAlign hAlign=HAlign::kLeft, const JCoordinate height=0, const VAlign vAlign=VAlign::kTop)=0 |
|
void | String (const JFloat angle, const JPoint &topLeft, const JString &str, const JCoordinate width=0, const HAlign hAlign=HAlign::kLeft, const JCoordinate height=0, const VAlign vAlign=VAlign::kTop) |
|
void | String (const JFloat angle, const JRect &rect, const JString &str, const HAlign hAlign=HAlign::kLeft, const VAlign vAlign=VAlign::kTop) |
|
virtual void | StringNoSubstitutions (const JCoordinate left, const JCoordinate top, const JString &str)=0 |
|
virtual void | Point (const JCoordinate x, const JCoordinate y)=0 |
|
void | Point (const JPoint &pt) |
|
virtual void | Line (const JCoordinate x1, const JCoordinate y1, const JCoordinate x2, const JCoordinate y2)=0 |
|
void | Line (const JPoint &pt1, const JPoint &pt2) |
|
void | LineTo (const JCoordinate x, const JCoordinate y) |
|
void | LineTo (const JPoint &pt) |
|
void | DeltaLine (const JCoordinate dx, const JCoordinate dy) |
|
void | DeltaLine (const JPoint &delta) |
|
virtual void | Rect (const JCoordinate x, const JCoordinate y, const JCoordinate w, const JCoordinate h)=0 |
|
void | Rect (const JPoint &upperLeft, const JCoordinate w, const JCoordinate h) |
|
void | Rect (const JRect &bounds) |
|
void | RectInside (const JRect &bounds) |
|
virtual void | Ellipse (const JCoordinate x, const JCoordinate y, const JCoordinate w, const JCoordinate h)=0 |
|
void | Ellipse (const JPoint &upperLeft, const JCoordinate w, const JCoordinate h) |
|
void | Ellipse (const JRect &bounds) |
|
virtual void | Arc (const JCoordinate x, const JCoordinate y, const JCoordinate w, const JCoordinate h, const JFloat startAngle, const JFloat deltaAngle)=0 |
|
void | Arc (const JPoint &upperLeft, const JCoordinate w, const JCoordinate h, const JFloat startAngle, const JFloat deltaAngle) |
|
void | Arc (const JRect &bounds, const JFloat startAngle, const JFloat deltaAngle) |
|
virtual void | Polygon (const JCoordinate left, const JCoordinate top, const JPolygon &poly)=0 |
|
void | Polygon (const JPoint &upperLeft, const JPolygon &poly) |
|
void | Polygon (const JPolygon &poly) |
|
void | Image (const JImage &image, const JRect &srcRect, const JCoordinate left, const JCoordinate top) |
|
void | Image (const JImage &image, const JRect &srcRect, const JPoint &topLeft) |
|
virtual void | Image (const JImage &image, const JRect &srcRect, const JRect &destRect)=0 |
|
This class abstracts the functions required to draw to the screen and
to a printer. Derived classes must implement the following functions:
SetClipRect
Set the rectangle that drawing will be clipped to.
String
The first version draws text horizontally inside the specified
rectangle with the specified horizontal and vertical alignment.
The second version draws rotated text. This routine is only
required to handle rotations of 0, 90, 180, and 270 degrees.
Point
Draw a point.
Line
Draw a line between the two specified points. Call SetPenLocation()
with the ending point.
Rect
Draw the specified rectangle. If IsFilled() returns true,
fill the rectangle.
Ellipse
Draw an ellipse inside the specified rectangle. If IsFilled()
returns true, fill the ellipse.
Arc
Draw the specified arc inside the specified rectangle. startAngle
follows the usual convention of zero degrees on the positive x-axis and
increases counterclockwise. deltaAngle tells how much of the arc
to draw (in degrees) and is positive in the counterclockwise direction.
If IsFilled() returns true, fill the ellipse as a pie slice.
Polygon
Draw the specified polygon, including the closing line from the
last vertex to the first vertex. top and left specify the offset of
the vertices relative to the current origin. If IsFilled() returns true,
fill the polygon.
Image
Draw the portion of the image specified by srcRect into the
given destRect.