Painter
Graphic context.
Category | class |
Type | hime_painter_t |
Methods
void hime_painter_save(self)
Saves a copy of the drawing state onto a stack, operating on this copy
until a balanced call to Restore()
is made.
Parameters
hime_painter_t
self
Return
void
void hime_painter_restore(self)
Restores the drawing state after a call to Save()
. It is an error to
call Restore()
more times than Save()
.
Parameters
hime_painter_t
self
Return
void
void hime_painter_clip_rect(self, rect, op)
Appliy rect
to the current clip using the specified region op
.
Parameters
hime_painter_t
selfhime_rectf_t
recthime_clip_op_t
op
Return
void
void hime_painter_clip_path(self, path, op, anti_alias)
Adds path
to the current clip. Set anti_alias
to true if the clip
should be antialiased.
Parameters
hime_painter_t
selfhime_path_t
pathhime_clip_op_t
opbool
anti_alias
Return
void
void hime_painter_translate(self, offset)
Add translate transformation which moves the origin by offset
.
Parameters
hime_painter_t
selfhime_vector2df_t
offset
Return
void
void hime_painter_scale(self, x_scale, y_scale)
Add scaling transformation to the painter.
Parameters
hime_painter_t
selffloat
x_scalefloat
y_scale
Return
void
void hime_painter_rotate(self, rotate)
Add rotation transformation to the painter.
Parameters
hime_painter_t
selffloat
rotate
Return
void
void hime_painter_draw_color(self, color, mode)
Fill the entire canvas' bitmap (restricted to current clip) with
specified color
and mode
.
Parameters
hime_painter_t
selfhime_color_t
colorhime_blend_mode_t
mode
Return
void
void hime_painter_draw_line(self, p1, p2, flags)
Draws a line with the given paint
parameters.
Parameters
hime_painter_t
selfhime_pointf_t
p1hime_pointf_t
p2hime_paint_t*
flags
Return
void
void hime_painter_draw_rect(self, rect, paint)
Draw the given rectangle with the given paint
parameters.
Parameters
hime_painter_t
selfhime_rectf_t
recthime_paint_t*
paint
Return
void
void hime_painter_draw_oval(self, rect, paint)
Draw an oval.
Parameters
hime_painter_t
selfhime_rectf_t
recthime_paint_t*
paint
Return
void
void hime_painter_draw_round_rect(self, rect, radius, paint)
Draw the given rectangle with rounded corners of radius
using the
given flags
parameters.
Parameters
hime_painter_t
selfhime_rectf_t
rectfloat
radiushime_paint_t*
paint
Return
void
void hime_painter_draw_path(self, path, paint)
Draw the given path
using the given paint
parameters.
Parameters
hime_painter_t
selfhime_path_t
pathhime_paint_t*
paint
Return
void