83 #include <fifechan/rectangle.hpp>
84 #include <fifechan/graphics.hpp>
101 setHeight(image->getHeight());
102 setWidth(image->getWidth());
114 Rectangle rect(0, 0, w, h);
115 while (rect.x < getWidth()) {
117 while (rect.y < getHeight()) {
118 graphics->drawImage(
mImage, rect.x, rect.y, rect.x, rect.y, rect.width, rect.height);
119 rect.y += rect.height;
121 rect.x += rect.width;
124 graphics->drawImage(
mImage, 0, 0, 0, 0, w, h);
131 Color faceColor = getBaseColor();
132 Color highlightColor, shadowColor;
133 int32_t alpha = getBaseColor().a;
134 int32_t width = getWidth() + getFrameSize() * 2 - 1;
135 int32_t height = getHeight() + getFrameSize() * 2 - 1;
136 highlightColor = faceColor + 0x303030;
137 highlightColor.a = alpha;
138 shadowColor = faceColor - 0x303030;
139 shadowColor.a = alpha;
142 for (i = 0; i < getFrameSize(); ++i)
144 graphics->setColor(shadowColor);
145 graphics->drawLine(i,i, width - i, i);
146 graphics->drawLine(i,i + 1, i, height - i - 1);
147 graphics->setColor(highlightColor);
148 graphics->drawLine(width - i,i + 1, width - i, height - i);
149 graphics->drawLine(i,height - i, width - i - 1, height - i);
156 setHeight(image->getHeight());
157 setWidth(image->getWidth());
Icon2(Image *image)
Constructor.
virtual void draw(Graphics *graphics)
void setTiling(bool tile)
void setScaling(bool scale)
virtual void drawFrame(Graphics *graphics)
void setImage(Image *image)