summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorracarr <racarr>2007-01-28 20:09:54 +0000
committerracarr <racarr>2007-01-28 20:09:54 +0000
commite52561c57f722a50fbe81661025feddb710f2ba3 (patch)
tree087306df5e6dc68422aa400c953377f5671d9fc0
parenta2c56242dc5c2cd0ad57e6122ef1cfd16ff0a64a (diff)
downloadberyl-desktop-manager-e52561c57f722a50fbe81661025feddb710f2ba3.tar.gz
beryl-desktop-manager-e52561c57f722a50fbe81661025feddb710f2ba3.tar.bz2
Add int cairoOperator to BDM paint attrib and update renderText and renderImage to set cairo operator to text->attrib->cairoOperator so operator is not always OVER, etc
-rw-r--r--src/bdm.c6
-rw-r--r--src/bdm.h1
2 files changed, 4 insertions, 3 deletions
diff --git a/src/bdm.c b/src/bdm.c
index 44a2532..cb2f101 100644
--- a/src/bdm.c
+++ b/src/bdm.c
@@ -38,7 +38,7 @@ static void renderImage(cairo_t * cr, BDMImage * image, ScreenArea * area)
int y = image->attrib->y;
int width = image->pixW;
int height = image->pixH;
- cairo_set_operator(cr,CAIRO_OPERATOR_OVER);
+ cairo_set_operator(cr,image->attrib->cairoOperator);
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);
@@ -98,7 +98,7 @@ static void renderText (cairo_t * cr, BDMText * text, ScreenArea * area)
cairo_paint(cr);
cairo_save(cr);
- cairo_set_operator (cr, CAIRO_OPERATOR_OVER);
+ cairo_set_operator (cr, text->attrib->cairoOperator);
pango_layout_get_pixel_size (layout, &w, &h);
cairo_scale (cr, (float)text->attrib->width/(float)w,
(float)text->attrib->height/(float)h);
@@ -264,7 +264,7 @@ int main(int argc, char * argv[])
if (error != NULL || n_keys == 0)
{
- fprintf (stderr, "All your wallpapers are belong to me.\n");
+ fprintf (stderr, "Something broke (that means I hate you) or you don't have any wallpapers in your file (but it was found and has the proper format).\n");
return 1;
}
diff --git a/src/bdm.h b/src/bdm.h
index 1e487a2..8441a13 100644
--- a/src/bdm.h
+++ b/src/bdm.h
@@ -77,6 +77,7 @@ typedef struct _BDMPaintAttribs
int needsPainting;
int updateFont;
+ int cairoOperator;
} BDMPaintAttribs;
typedef struct _BDMImage BDMImage;