#include <QSwingGraphics.h>
Public Member Functions | |
QSwingGraphics (QPaintDevice *device) | |
Constructs new QSwingGraphics object. | |
QSwingGraphics (QPaintDevice *device, jint x, jint y, jint width, jint height) | |
Constructs new QSwingGraphics object. | |
jobject | getColor () |
Returns current color of the graphics. | |
void | setColor (jint argb) |
Sets current color of the graphics. | |
jobject | getFont () |
Returns current font of the graphics. | |
void | setFont (jobject font) |
Sets current font of the graphics. | |
void | setLinearGradient (jint x1, jint y1, jint argb1, jint x2, jint y2, jint argb2, jboolean cyclic) |
Sets linear gradient. | |
void | setTextureGradient (QPixmap *image) |
Sets texture gradient. | |
void | setBasicStroke (jfloat width, jint cap, jint join, jfloat miterLimit, jfloatArray dash, jfloat dashPhase) |
Sets basic stroke. | |
void | push () |
Pushes the state of the graphics. | |
void | pop () |
Pops the state of the graphics. | |
void | drawImage (jbyteArray imageData, jint length, jint x, jint y) |
Pops the state of the graphics. | |
void | fillRect (jint x, jint y, jint w, jint h) |
Fills rectangle. | |
void | fillOval (jint x, jint y, jint w, jint h) |
Fills oval. | |
Static Public Member Functions | |
static bool | canPaint (JNIEnv *env, jlong graphicsPointer) |
Tests if specifed graphics can paint. |
QSwingGraphics::QSwingGraphics | ( | QPaintDevice * | device | ) |
QSwingGraphics::QSwingGraphics | ( | QPaintDevice * | device, | |
jint | x, | |||
jint | y, | |||
jint | width, | |||
jint | height | |||
) |
Constructs new QSwingGraphics object.
device | the QPaintDevice | |
x | the x coordinate of the clipping region | |
y | the y coordinate of the clipping region | |
width | the width of the clipping region | |
height | the height of the clipping region |
jobject QSwingGraphics::getColor | ( | ) |
Returns current color of the graphics.
void QSwingGraphics::setColor | ( | jint | argb | ) |
Sets current color of the graphics.
argb | the argb value of the color |
jobject QSwingGraphics::getFont | ( | ) |
Returns current font of the graphics.
void QSwingGraphics::setFont | ( | jobject | font | ) |
Sets current font of the graphics.
font | the QSwing font object |
void QSwingGraphics::setLinearGradient | ( | jint | x1, | |
jint | y1, | |||
jint | argb1, | |||
jint | x2, | |||
jint | y2, | |||
jint | argb2, | |||
jboolean | cyclic | |||
) |
Sets linear gradient.
x1 | the x coordinate of the gradient's start point | |
y1 | the y coordinate of the gradient's start point | |
argb1 | the argb value of the first color | |
x2 | the x coordinate of the gradient's end point | |
y2 | the y coordinate of the gradient's end point | |
argb2 | the argb value of the second color | |
cyclic | true if the gradient is cyclic |
void QSwingGraphics::setTextureGradient | ( | QPixmap * | image | ) |
Sets texture gradient.
image | the patern image |
void QSwingGraphics::setBasicStroke | ( | jfloat | width, | |
jint | cap, | |||
jint | join, | |||
jfloat | miterLimit, | |||
jfloatArray | dash, | |||
jfloat | dashPhase | |||
) |
Sets basic stroke.
width | the stroke width | |
cap | the stroke cap | |
join | the stroke join | |
miterLimit | the stroke miter limit | |
dash | the stroke dash | |
dashPhase | the stroke dash phase |
void QSwingGraphics::drawImage | ( | jbyteArray | imageData, | |
jint | length, | |||
jint | x, | |||
jint | y | |||
) |
Pops the state of the graphics.
imageData | the image data | |
length | the length of the image data | |
x | the x coordinate of the image | |
y | the y coordinate of the image |
void QSwingGraphics::fillRect | ( | jint | x, | |
jint | y, | |||
jint | w, | |||
jint | h | |||
) |
Fills rectangle.
x | the x coordinate of the rectangle | |
y | the y coordinate of the rectangle | |
w | the width of the rectangle | |
h | the height of the rectangle |
void QSwingGraphics::fillOval | ( | jint | x, | |
jint | y, | |||
jint | w, | |||
jint | h | |||
) |
Fills oval.
x | the x coordinate of the oval | |
y | the y coordinate of the oval | |
w | the width of the oval | |
h | the height of the oval |
bool QSwingGraphics::canPaint | ( | JNIEnv * | env, | |
jlong | graphicsPointer | |||
) | [inline, static] |
Tests if specifed graphics can paint.
env | the JNIEnv pointer | |
graphicsPointer | the graphics pointer |
true
if graphics object can paint