83 #include <guichan/rectangle.hpp>
84 #include <guichan/graphics.hpp>
99 setHeight(image->getHeight());
100 setWidth(image->getWidth());
107 graphics->drawImage(
mImage, 0, 0, 0, 0, getWidth(), getHeight());
113 Color faceColor = getBaseColor();
114 Color highlightColor, shadowColor;
115 int32_t alpha = getBaseColor().a;
116 int32_t width = getWidth() + getFrameSize() * 2 - 1;
117 int32_t height = getHeight() + getFrameSize() * 2 - 1;
118 highlightColor = faceColor + 0x303030;
119 highlightColor.a = alpha;
120 shadowColor = faceColor - 0x303030;
121 shadowColor.a = alpha;
124 for (i = 0; i < getFrameSize(); ++i)
126 graphics->setColor(shadowColor);
127 graphics->drawLine(i,i, width - i, i);
128 graphics->drawLine(i,i + 1, i, height - i - 1);
129 graphics->setColor(highlightColor);
130 graphics->drawLine(width - i,i + 1, width - i, height - i);
131 graphics->drawLine(i,height - i, width - i - 1, height - i);
138 setHeight(image->getHeight());
139 setWidth(image->getWidth());
void setImage(Image *image)
virtual void draw(Graphics *graphics)
Icon2(Image *image)
Constructor.
virtual void drawFrame(Graphics *graphics)