draw Namespace Reference

Documentation

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.

Class List

class  Animation
 
class  AnimationAttr
 
class  ArcProgress
 
class  Axis
 
class  BarGraph
 
class  BarProgress
 
class  CircleProgress
 
class  DataSet
 
class  Drawing
 
struct  drawing_attr_t
 
struct  drawing_dim_t
 
struct  drawing_point_t
 
struct  drawing_scaled_attr_t
 
class  DrawingAttr
 
class  DrawingScaledAttr
 
class  Graph
 
class  Icon
 
class  IconAttr
 
class  Image
 
class  LineGraph
 
class  Panel
 
class  PanelAttr
 
class  Progress
 
class  ProgressAttr
 
class  Rect
 
class  Text
 
class  TextAttr
 
class  TextBox
 

Typedef List

typedef s16 drawing_int_t
 
typedef u16 drawing_size_t
 

Function List

drawing_dim_t drawing_dim (drawing_size_t w, drawing_size_t h)
 
drawing_point_t drawing_point (drawing_int_t x, drawing_int_t y)
 

Typedef Documentation

typedef s16 draw::drawing_int_t

Drawing position (signed)

typedef u16 draw::drawing_size_t

Drawing size (unsigned)

Function Documentation

drawing_dim_t draw::drawing_dim ( drawing_size_t  w,
drawing_size_t  h 
)

This returns a drawing_dim_t populated with the width and height.

Parameters
wWidth of the returned data
hHeight of the retured data
Returns
A drawing_dim_t with w and h populated as specified
drawing_point_t draw::drawing_point ( drawing_int_t  x,
drawing_int_t  y 
)

This returns a drawing_point_t populated with x and y