mixin gfx::Graphics

gfx::Graphics

@Js

Source

Graphics is used to draw 2D graphics. Targets might include display devices, printers, SVG/Canvas, or PDF.

See Fwt for details.

alpha

abstract Int alpha

Source

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

antialias

abstract Bool antialias

Source

Used to toggle anti-aliasing on and off.

brush

abstract Brush brush

Source

Current brush defines how text and shapes are filled.

clip

abstract This clip(Rect r)

Source

Set the clipping area to the intersection of the current clipping region and the specified rectangle. Also see clipBounds.

clipBounds

abstract Rect clipBounds()

Source

Get the bounding rectangle of the current clipping area. Also see clip.

copyImage

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

Source

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.

dispose

abstract Void dispose()

Source

Free any operating system resources used by this instance.

drawArc

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

Source

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

drawImage

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

Source

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

drawLine

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

Source

Draw a line with the current pen and brush.

drawOval

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

Source

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

drawPolygon

abstract This drawPolygon(Point[] p)

Source

Draw a polygon with the current pen and brush.

drawPolyline

abstract This drawPolyline(Point[] p)

Source

Draw a polyline with the current pen and brush.

drawRect

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

Source

Draw a rectangle with the current pen and brush.

drawRoundRect

abstract This drawRoundRect(Int x, Int y, Int w, Int h, Int wArc, Int hArc)

Source

Draw a rectangle with rounded corners with the current pen and brush. The ellipse of the corners is specified by wArc and hArc.

drawText

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

Source

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.

fillArc

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

Source

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

fillOval

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

Source

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

fillPolygon

abstract This fillPolygon(Point[] p)

Source

Fill a polygon with the current brush.

fillRect

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

Source

Fill a rectangle with the current brush.

fillRoundRect

abstract This fillRoundRect(Int x, Int y, Int w, Int h, Int wArc, Int hArc)

Source

Fill a rectangle with rounded corners with the current brush. The ellipse of the corners is specified by wArc and hArc.

font

abstract Font font

Source

Current font used for drawing text.

path

abstract GraphicsPath path()

Source

Begin a new pathing operation.

pen

abstract Pen pen

Source

Current pen defines how the shapes are stroked.

pop

abstract Void pop()

Source

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

push

abstract Void push()

Source

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

translate

abstract This translate(Int x, Int y)

Source

Translate the coordinate system to the new origin.