JX Application Framework
|
#include <JXGC.h>
Public Member Functions | |
JXGC (JXDisplay *display, const Drawable drawable) | |
~JXGC () | |
JXDisplay * | GetDisplay () const |
bool | GetClipping (JPoint *offset, Region *region, JXImageMask **pixmap) |
void | SetClipRect (const JRect &clipRect) |
void | SetClipRegion (const Region clipRegion) |
void | SetClipPixmap (const JPoint &offset, Pixmap pixmap) |
void | SetClipPixmap (const JPoint &offset, const JXImageMask &mask) |
void | ClearClipping () |
void | SetDrawingColor (const JColorID color) |
void | SetDrawingFunction (const int function) |
void | SetLineWidth (const JSize width) |
void | DrawDashedLines (const bool on) |
void | SetDashList (const JArray< JSize > &dashList, const JSize offset=0) |
void | SetSubwindowMode (const int mode) |
void | DrawPoint (const Drawable drawable, const JCoordinate x, const JCoordinate y) const |
void | DrawLine (const Drawable drawable, const JCoordinate x1, const JCoordinate y1, const JCoordinate x2, const JCoordinate y2) const |
void | DrawLines (const Drawable drawable, const JSize ptCount, XPoint xpt[]) const |
void | DrawRect (const Drawable drawable, const JCoordinate x, const JCoordinate y, const JCoordinate width, const JCoordinate height) const |
void | FillRect (const Drawable drawable, const JCoordinate x, const JCoordinate y, const JCoordinate width, const JCoordinate height) const |
void | DrawArc (const Drawable drawable, const JCoordinate x, const JCoordinate y, const JCoordinate width, const JCoordinate height, const JFloat startAngle, const JFloat deltaAngle) const |
void | FillArc (const Drawable drawable, const JCoordinate x, const JCoordinate y, const JCoordinate width, const JCoordinate height, const JFloat startAngle, const JFloat deltaAngle) const |
void | FillPolygon (const Drawable drawable, const JSize ptCount, XPoint xpt[]) const |
void | SetFont (const JFontID id) |
void | DrawString (const Drawable drawable, XftDraw *fdrawable, const JCoordinate x, const JCoordinate y, const JString &str) const |
void | CopyPixels (const Drawable source, const JCoordinate src_x, const JCoordinate src_y, const JCoordinate width, const JCoordinate height, const Drawable dest, const JCoordinate dest_x, const JCoordinate dest_y) const |
void | CopyImage (const XImage *source, const JCoordinate src_x, const JCoordinate src_y, const JCoordinate width, const JCoordinate height, const Drawable dest, const JCoordinate dest_x, const JCoordinate dest_y) const |
Represents a single X Graphics Context. We don't provide a convertion to GC because that would break our buffering of GC settings. (color, etc) This buffering is important for reducing the number of server calls. If we are depth 1, drawing in any color other than JXImageMask::kPixelOff produces "pixel on". Refer to JXImageMask::ColorToBit(). This class was not designed to be a base class.
JXGC::JXGC | ( | JXDisplay * | display, |
const Drawable | drawable | ||
) |
JXGC::~JXGC | ( | ) |
void JXGC::ClearClipping | ( | ) |
void JXGC::CopyImage | ( | const XImage * | source, |
const JCoordinate | src_x, | ||
const JCoordinate | src_y, | ||
const JCoordinate | width, | ||
const JCoordinate | height, | ||
const Drawable | dest, | ||
const JCoordinate | dest_x, | ||
const JCoordinate | dest_y | ||
) | const |
void JXGC::CopyPixels | ( | const Drawable | source, |
const JCoordinate | src_x, | ||
const JCoordinate | src_y, | ||
const JCoordinate | width, | ||
const JCoordinate | height, | ||
const Drawable | dest, | ||
const JCoordinate | dest_x, | ||
const JCoordinate | dest_y | ||
) | const |
void JXGC::DrawArc | ( | const Drawable | drawable, |
const JCoordinate | x, | ||
const JCoordinate | y, | ||
const JCoordinate | width, | ||
const JCoordinate | height, | ||
const JFloat | startAngle, | ||
const JFloat | deltaAngle | ||
) | const |
void JXGC::DrawDashedLines | ( | const bool | on | ) |
void JXGC::DrawLine | ( | const Drawable | drawable, |
const JCoordinate | x1, | ||
const JCoordinate | y1, | ||
const JCoordinate | x2, | ||
const JCoordinate | y2 | ||
) | const |
void JXGC::DrawLines | ( | const Drawable | drawable, |
const JSize | ptCount, | ||
XPoint | xpt[] | ||
) | const |
xpt[0] must be the same as xpt[ptCount-1] in order to close the polygon.
void JXGC::DrawPoint | ( | const Drawable | drawable, |
const JCoordinate | x, | ||
const JCoordinate | y | ||
) | const |
void JXGC::DrawRect | ( | const Drawable | drawable, |
const JCoordinate | x, | ||
const JCoordinate | y, | ||
const JCoordinate | width, | ||
const JCoordinate | height | ||
) | const |
void JXGC::DrawString | ( | const Drawable | drawable, |
XftDraw * | fdrawable, | ||
const JCoordinate | origX, | ||
const JCoordinate | y, | ||
const JString & | str | ||
) | const |
If the string is too long to be sent to the server in one chunk, we split it up.
void JXGC::FillArc | ( | const Drawable | drawable, |
const JCoordinate | x, | ||
const JCoordinate | y, | ||
const JCoordinate | width, | ||
const JCoordinate | height, | ||
const JFloat | startAngle, | ||
const JFloat | deltaAngle | ||
) | const |
void JXGC::FillPolygon | ( | const Drawable | drawable, |
const JSize | ptCount, | ||
XPoint | xpt[] | ||
) | const |
void JXGC::FillRect | ( | const Drawable | drawable, |
const JCoordinate | x, | ||
const JCoordinate | y, | ||
const JCoordinate | width, | ||
const JCoordinate | height | ||
) | const |
bool JXGC::GetClipping | ( | JPoint * | offset, |
Region * | region, | ||
JXImageMask ** | pixmap | ||
) |
Returns true if we have any clipping set. *region is created, if necessary. *pixmap is set to the current pixmap, if any. Thus, the caller owns the resulting region, but we own the resulting pixmap.
|
inline |
void JXGC::SetClipPixmap | ( | const JPoint & | offset, |
const JXImageMask & | mask | ||
) |
void JXGC::SetClipPixmap | ( | const JPoint & | offset, |
Pixmap | pixmap | ||
) |
We take ownership of the pixmap that is passed in.
void JXGC::SetClipRect | ( | const JRect & | clipRect | ) |
void JXGC::SetClipRegion | ( | const Region | clipRegion | ) |
We do not take ownership of the clipRegion that is passed in.
void JXGC::SetDrawingColor | ( | const JColorID | color | ) |
void JXGC::SetDrawingFunction | ( | const int | function | ) |
|
inline |
void JXGC::SetLineWidth | ( | const JSize | width | ) |
void JXGC::SetSubwindowMode | ( | const int | mode | ) |
Possible arguments are: ClipByChildren, IncludeInferiors