Fan

 

class

fwt::Graphics

sys::Obj
  fwt::Graphics

Graphics is used to draw to the screen or to an offscreen image.

See docLib for details.

Slots

alphaSource

native Int alpha

Current alpha value used to render text, images, and shapes. The value must be between 0 (transparent) and 255 (opaue).

antialiasSource

native Bool antialias

Used to toggle anti-aliasing on and off.

brushSource

native Brush brush

Current brush defines how text and shapes are filled.

clipSource

native This clip(Rect r)

Set the clipping area to the intersection of the current clipRect and the specified rectangle.

clipRectSource

native Rect clipRect

Current clipping rectangle. Also see clip.

copyImageSource

native This copyImage(Image image, Rect src, Rect dest)

Copy a rectangular region of the image to the graphics device. If the source and destination don't have the same size, then the copy is resized.

disposeSource

native Void dispose()

Free any operating system resources used by this instance.

drawArcSource

native This drawArc(Int x, Int y, Int w, Int h, Int startAngle, Int arcAngle)

Draw an arc with the current pen and brush. The angles are measured in degrees with 0 degrees is 3 o'clock. The origin of the arc is centered within x, y, w, h.

drawImageSource

native This drawImage(Image image, Int x, Int y)

Draw a the image string with its top left corner at x,y.

drawLineSource

native This drawLine(Int x1, Int y1, Int x2, Int y2)

Draw a line with the current pen and brush.

drawOvalSource

native This drawOval(Int x, Int y, Int w, Int h)

Draw an oval with the current pen and brush. The oval is fit within the rectangle specified by x, y, w, h.

drawPointSource

native This drawPoint(Int x, Int y)

Draw a pixel with the current brush.

drawRectSource

native This drawRect(Int x, Int y, Int w, Int h)

Draw a rectangle with the current pen and brush.

drawTextSource

native This drawText(Str s, Int x, Int y)

Draw a the text string with the current brush and font. The x, y coordinate specifies the top left corner of the rectangular area where the text is to be drawn.

fillArcSource

native This fillArc(Int x, Int y, Int w, Int h, Int startAngle, Int arcAngle)

Fill an arc with the current brush. The angles are measured in degrees with 0 degrees is 3 o'clock. The origin of the arc is centered within x, y, w, h.

fillOvalSource

native This fillOval(Int x, Int y, Int w, Int h)

Fill an oval with the current brush. The oval is fit within the rectangle specified by x, y, w, h.

fillRectSource

native This fillRect(Int x, Int y, Int w, Int h)

Fill a rectangle with the current brush.

fontSource

native Font font

Current font used for drawing text.

penSource

native Pen pen

Current pen defines how the shapes are stroked.

popSource

native Void pop()

Pop the graphics stack and reset the state to the the last push.

pushSource

native Void push()

Push the current graphics state onto an internal stack. Reset the state back to its current state via pop.

translateSource

native This translate(Int x, Int y)

Translate the coordinate system to the new origin.