summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorracarr <racarr>2007-01-28 19:11:40 +0000
committerracarr <racarr>2007-01-28 19:11:40 +0000
commit2fa98a3fdb4b3284fc23f2855fc2782752f0938b (patch)
treedcee77d5571ec5fee13e19e4636296b8870b63e5
parentb0a006e517453cf7e9167e392910abed7aa267ed (diff)
downloadberyl-desktop-manager-2fa98a3fdb4b3284fc23f2855fc2782752f0938b.tar.gz
beryl-desktop-manager-2fa98a3fdb4b3284fc23f2855fc2782752f0938b.tar.bz2
Actually scale images as indicated by image->attrib->width rather than just just scaling the drawing area and painting the image poorly
-rw-r--r--src/bdm.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/bdm.c b/src/bdm.c
index 682e52a..3772018 100644
--- a/src/bdm.c
+++ b/src/bdm.c
@@ -34,9 +34,10 @@ static void renderImage(cairo_t * cr, BDMImage * image, ScreenArea * area)
int x = image->attrib->x;
int y = image->attrib->y;
- int width = image->attrib->width;
- int height = image->attrib->height;
+ int width = image->pixW;
+ int height = image->pixH;
+ cairo_scale(cr,(float)image->attrib->width/image->pixW,image->attrib->height/(float)image->pixH);
cairo_rotate(cr,image->attrib->xrot);
cairo_rectangle(cr,widx+x,widy+y,widx+x+width,widy+y+height);
cairo_fill(cr);