ICanvas class

ICanvas class

Represents a canvas for drawing 2D graphics.

The ICanvas type exposes the following members:

Properties

PropertyDescription
contextGets the canvas context associated with the canvas.

Methods

MethodDescription
arcAdds an arc to the current path.
arcAdds an arc to the current path.
clipSets the current clipping path using the specified fill rule.
clipSets the current clipping path using the specified path and fill rule.
ellipseAdds an ellipse to the current path.
ellipseAdds an ellipse to the current path.
fillFills the current path with the specified fill rule.
fillFills the specified path with the specified fill rule.
is_point_in_pathDetermines whether the specified point is inside the current path using the specified fill rule.
is_point_in_pathDetermines whether the specified point is inside the specified path using the specified fill rule.
is_point_in_strokeDetermines whether the specified point is inside the current stroked path.
is_point_in_strokeDetermines whether the specified point is inside the specified stroked path.
strokeStrokes the current path.
strokeStrokes the specified path.
arc_toAdds an arc to the current path, connecting the previous point to the start point of the arc with a straight line.
begin_pathBegins a new subpath, discarding the current path if any.
bezier_curve_toAdds a cubic Bézier curve to the current path.
clear_rectClears the specified rectangular area to transparent.
close_pathCloses the current subpath by drawing a straight line from the current point to the starting point of the subpath.
draw_imageDraws an image on the canvas.
fill_rectFills the specified rectangular area with the current fill style.
fill_textFills the specified text at the specified position.
get_path_rectGets the bounding rectangle of the current path.
line_toAdds a line segment to the current path.
measure_textMeasures the width of the specified text using the current font properties.
move_toMoves the starting point of a new subpath to the specified point.
quadratic_curve_toAdds a quadratic Bézier curve to the current path.
rectAdds a rectangle to the current path.
restore_contextRestores the most recently saved canvas state by popping the top entry from the drawing state stack.
save_contextSaves the entire state of the canvas by pushing the current state onto a stack.
stroke_rectStrokes the specified rectangular area.
stroke_textStrokes the specified text at the specified position.

See Also