Bare Metal Programming Tool Kit
|
a drawable circle object More...
#include <graphics.h>
Public Member Functions | |
circle (frame &frame, const vector position, unsigned int radius, const color fg=color::black(), const color bg=color::transparent(), unsigned int width=1) | |
create a circle from a radius, fg and bg colcors, and line width | |
void | draw () const |
draw the circle on f, at position | |
Public Member Functions inherited from bmptk::graphics::drawable | |
frame & | frame_get () const |
get the parent frame | |
const vector | position_get () const |
get the position | |
color | fg_get () const |
get the forgeround color | |
color | bg_get () const |
get the background color | |
unsigned int | width_get () const |
get the width | |
void | position_set (const vector pos) |
set the position | |
void | fg_set (const color c) |
set the forgeround color | |
void | bg_set (const color c) |
set the background color | |
void | width_set (unsigned int w) |
set the width | |
Public Attributes | |
unsigned int | radius |
Additional Inherited Members | |
Protected Member Functions inherited from bmptk::graphics::drawable | |
void | drawable_draw_pixel (const vector address, const color c) const |
draw one pixel on f, at position | |
drawable (frame &fr, const vector position=vector::origin(), const color fg=color::black(), const color bg=color::transparent(), unsigned int width=1) | |
constructor, specify frame, position, fg, bg colors, (line) width | |
Protected Attributes inherited from bmptk::graphics::drawable | |
frame & | fr |
parent frame | |
vector | position |
the position | |
color | fg |
foreground color | |
color | bg |
background color | |
unsigned int | width |
width of (for instance) lines | |
a drawable circle object
A circle object is a drawable that represents a circle. When it draws itself it will use the fg of its drawable part for its boundary line, which will be filled to the width by drawing extra circles within the outer boundary. The remaining area within will be filled using the bg.
Definition at line 1412 of file graphics.h.
unsigned int bmptk::graphics::circle::radius |
the radius of the circle
The position of a drawable is specified when it is drawn, it is not part of the drawable. You can think of the origin being the centre.
Definition at line 1432 of file graphics.h.