Draw::GraphicContext
Inherits Draw::PathBuilder
Instance methods
clear_rect(x1 : Int32, y1 : Int32, x2 : Int32, y2 : Int32)
Fills the specified rectangle with a default transparent color
compose_matrix_transform(tr : Draw::Matrix)
Composes the current transformation matrix with tr
create_string_path(text : String, x : Float64, y : Float64) : Float64
Creates a path from the string s at x, y
fill_string_at(text : String, x : Float64, y : Float64) : Float64
Draws the text at the specified point (x, y)
save
Draws the raster image in the current canvas abstract def draw_image(image image.Image) Save the context and push it to the context stack
string_bounds(s : String) : Tuple(Float64, Float64, Float64, Float64)
Gets pixel bounds(dimensions) of given string
stroke_string_at(text : String, x : Float64, y : Float64) : Float64
Draws the contour of the text at point (x, y)
totate(angle : Float64)
Applies a rotation to the current transformation matrix. angle is in radian.
translate(tx : Float64, ty : Float64)
Applies a translation to the current transformation matrix.