namespace::draw

The draw namespace contains classes used for drawing and animating objects. The classes are built on the sgfx namespace which provides an API for accessing the Stratify Graphics library.

The base object is a Drawing. Classes that inherit objects must implement one of two methods: draw() or draw_to_scale().

The draw() method will draw objects on an abstract drawing canvas with a width and height of DrawingAttr::scale() usually 1000.

The draw_to_scale() is ultimately called by the draw() method to draw directly on a hal::Display.

Details

public sg_color_tcolor_transparent()


publicdrawing_area_tdrawing_area(drawing_size_tw,drawing_size_th)

This returns a drawing_area_t populated with the width and height.

Parameters

  • w Width of the returned data

  • h Height of the retured data

Returns

A drawing_area_t with w and h populated as specified


publicdrawing_area_tdrawing_dim(drawing_size_tw,drawing_size_th)


publicdrawing_point_tdrawing_point(drawing_int_tx,drawing_int_ty)

This returns a drawing_point_t populated with x and y


X

Thanks for Coming!

Subscribe to news and updates