aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk
diff options
context:
space:
mode:
Diffstat (limited to 'src/FbTk')
-rw-r--r--src/FbTk/TextureRender.cc15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/FbTk/TextureRender.cc b/src/FbTk/TextureRender.cc
index ea126f5..511136e 100644
--- a/src/FbTk/TextureRender.cc
+++ b/src/FbTk/TextureRender.cc
@@ -779,25 +779,26 @@ Pixmap TextureRender::renderSolid(const FbTk::Texture &texture) {
779 779
780 if (texture.type() & Texture::INTERLACED) { 780 if (texture.type() & Texture::INTERLACED) {
781 lgc.setForeground(texture.colorTo()); 781 lgc.setForeground(texture.colorTo());
782 register unsigned int i = 0; 782 unsigned int i;
783 for (; i < height; i += 2) 783 for (i = 0; i < height; i += 2)
784 pixmap.drawLine(lgc.gc(), 0, i, width - 1, i); 784 pixmap.drawLine(lgc.gc(), 0, i, width - 1, i);
785 785
786 } 786 }
787 787
788 lgc.setForeground(texture.loColor()); 788 lgc.setForeground(texture.loColor());
789 789
790 if (texture.type() & Texture::BEVEL1) { 790
791 if (height > 1 && width > 1 && texture.type() & Texture::BEVEL1) {
791 if (texture.type() & Texture::RAISED) { 792 if (texture.type() & Texture::RAISED) {
792 drawBevelRectangle(pixmap, lgc.gc(), hgc.gc(), 0, height - 1, width -1 , 0); 793 drawBevelRectangle(pixmap, lgc.gc(), hgc.gc(), 0, height - 1, width - 1, 0);
793 } else if (texture.type() & Texture::SUNKEN) { 794 } else if (texture.type() & Texture::SUNKEN) {
794 drawBevelRectangle(pixmap, hgc.gc(), lgc.gc(), 0, height - 1, width - 1, 0); 795 drawBevelRectangle(pixmap, hgc.gc(), lgc.gc(), 0, height - 1, width - 1, 0);
795 } 796 }
796 } else if (texture.type() & Texture::BEVEL2) { 797 } else if (width > 2 && height > 2 && texture.type() & Texture::BEVEL2) {
797 if (texture.type() & Texture::RAISED) { 798 if (texture.type() & Texture::RAISED) {
798 drawBevelRectangle(pixmap, lgc.gc(), hgc.gc(), 1, height - 3, width - 3, 1); 799 drawBevelRectangle(pixmap, lgc.gc(), hgc.gc(), 1, height - 2, width - 2, 1);
799 } else if (texture.type() & Texture::SUNKEN) { 800 } else if (texture.type() & Texture::SUNKEN) {
800 drawBevelRectangle(pixmap, hgc.gc(), lgc.gc(), 1, height - 3, width - 3, 1); 801 drawBevelRectangle(pixmap, hgc.gc(), lgc.gc(), 1, height - 2, width - 2, 1);
801 } 802 }
802 } 803 }
803 804