Painter
| Category | class |
| Type | hime_painter_t |
Graphic context.
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_tself
Return
voidvoid 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_tself
Return
voidvoid hime_painter_clip_rect(self, rect, op)
Appliy rect to the current clip using the specified region op.
Parameters
hime_painter_tselfhime_rectf_trecthime_clip_op_top
Return
voidvoid 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_tselfhime_path_tpathhime_clip_op_topboolanti_alias
Return
voidvoid hime_painter_translate(self, offset)
Add translate transformation which moves the origin by offset.
Parameters
hime_painter_tselfhime_vector2df_toffset
Return
voidvoid hime_painter_scale(self, x_scale, y_scale)
Add scaling transformation to the painter.
Parameters
hime_painter_tselffloatx_scalefloaty_scale
Return
voidvoid hime_painter_rotate(self, rotate)
Add rotation transformation to the painter.
Parameters
hime_painter_tselffloatrotate
Return
voidvoid hime_painter_draw_color(self, color, mode)
Fill the entire canvas' bitmap (restricted to current clip) with
specified color and mode.
Parameters
hime_painter_tselfhime_color_tcolorhime_blend_mode_tmode
Return
voidvoid hime_painter_draw_line(self, p1, p2, flags)
Draws a line with the given paint parameters.
Parameters
hime_painter_tselfhime_pointf_tp1hime_pointf_tp2hime_paint_t*flags
Return
voidvoid hime_painter_draw_rect(self, rect, paint)
Draw the given rectangle with the given paint parameters.
Parameters
hime_painter_tselfhime_rectf_trecthime_paint_t*paint
Return
voidvoid hime_painter_draw_oval(self, rect, paint)
Draw an oval.
Parameters
hime_painter_tselfhime_rectf_trecthime_paint_t*paint
Return
voidvoid 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_tselfhime_rectf_trectfloatradiushime_paint_t*paint
Return
voidvoid hime_painter_draw_path(self, path, paint)
Draw the given path using the given paint parameters.
Parameters
hime_painter_tselfhime_path_tpathhime_paint_t*paint
Return
voidvoid hime_painter_draw_image_at(self, image, location, paint)
Draw the image with the origin at the specified location, using the
specified paint parameters.
The upper left corner of the bitmap is rendered at the specified location.
Parameters
hime_painter_tselfhime_skia_image_timagehime_pointf_tlocationhime_paint_t*paint
Return
voidvoid hime_painter_draw_image(self, image, src, dest, paint)
Draw a portion of an image in the specified location.
The src corresponds to the region of the bitmap to draw in the region
defined by the dest coordinates.
If the width or height of the source differs from that of the destination, the image will be scaled. When scaling down, a mipmap will be generated.
Parameters
hime_painter_tselfhime_skia_image_timagehime_rectf_tsrchime_rectf_tdesthime_paint_t*paint
Return
void