29 #include <fifechan/rectangle.hpp> 30 #include <fifechan/graphics.hpp> 51 graphics->setColor(getForegroundColor());
55 graphics->fillRectangle(fcn::Rectangle(0,0,getWidth() *
mValue/100,getHeight()));
59 graphics->fillRectangle(fcn::Rectangle(0,getHeight()-getHeight() *
mValue/100,getWidth(),getHeight() *
mValue/100));
64 graphics->drawImage(
mImage, 0, 0);
72 setHeight(image->getHeight());
73 setWidth(image->getWidth());
void setForegroundImage(Image *image)
void setOrientation(Orientation orientation)
Sets the orientation of the percentage bar.
virtual void draw(Graphics *graphics)
double mValue
Holds the current value of the percentage bar.
Orientation mOrientation
Holds the orientation of the percentage bar.
PercentageBar()
Constructor.
void setValue(int32_t value)
Sets the value of the percentage bar.
Orientation getOrientation() const
Gets the orientation of the percentage bar.
int32_t getValue() const
Gets the value of the percentage bar.