class::draw::Icon

class draw::Icon
  : public draw::Drawing

This class draws icons that can be scaled and rotated on a bitmap.

When an icon is drawn, the icon’s pen attributes are used to draw on the bitmap.

The icon is looked up by name using any icon files that are installed in any of the system assets locations.

Summary

Icon()

sgfx::Region bounds() const

virtual void draw_to_scale(

const DrawingScaledAttr & attr
)

const var::String & name() const

s16 rotation() const

Icon & set_align_bottom()

Icon & set_align_center()

Icon & set_align_left()

Icon & set_align_middle()

Icon & set_align_right()

Icon & set_align_top()

Icon & set_color(

sg_color_t value
)

Icon & set_name(

const var::ConstString & name
)

Icon & set_rotation(

s16 rotation
)

enum @4

Members

Icon()

Construct an empty graphic


sgfx::Region bounds() const

This returns the bounds of the icon. It is only valid after the icon has been drawn on a bitmap.

Returns

The bounds of the last time this icon was drawn on a bitmap using draw_to_scale()


virtual void draw_to_scale(

const DrawingScaledAttr & attr
)

Draws the graphic to scale on the specified bitmap


const var::String & name() const

s16 rotation() const

Returns the rotation


Icon & set_align_bottom()

Icon & set_align_center()

Icon & set_align_left()

Icon & set_align_middle()

Icon & set_align_right()

Icon & set_align_top()

Icon & set_color(

sg_color_t value
)


Icon & set_name(

const var::ConstString & name
)


Icon & set_rotation(

s16 rotation
)

Set the rotation


enum @4
  • RIGHT Point to the right.
  • DOWN Point down.
  • LEFT Point to the left.
  • UP Point up.
  • QUARTER_CLOCKWISE Add/subtract to/from RIGHT, DOWN, etc.
  • QUARTER_COUNTER_CLOCKWISE Add/subtract to/from RIGHT, DOWN, etc.
  • EIGHTH_CLOCKWISE Add/subtract to/from RIGHT, DOWN, etc.
  • EIGHTH_COUNTER_CLOCKWISE Add/subtract to/from RIGHT, DOWN, etc.

Icon rotation orientations


X

Thanks for Coming!

Subscribe to news and updates