mirror of
https://github.com/gryf/wmaker.git
synced 2026-01-03 12:24:17 +01:00
Added WMCreateBlendedPixmapFromRImage()
This commit is contained in:
@@ -49,8 +49,8 @@ WMCreatePixmap(WMScreen *scrPtr, int width, int height, int depth, Bool masked)
|
||||
pixPtr->pixmap = XCreatePixmap(scrPtr->display, W_DRAWABLE(scrPtr),
|
||||
width, height, depth);
|
||||
if (masked) {
|
||||
pixPtr->mask = XCreatePixmap(scrPtr->display, W_DRAWABLE(scrPtr),
|
||||
width, height, 1);
|
||||
pixPtr->mask = XCreatePixmap(scrPtr->display, W_DRAWABLE(scrPtr),
|
||||
width, height, 1);
|
||||
} else {
|
||||
pixPtr->mask = None;
|
||||
}
|
||||
@@ -128,6 +128,21 @@ WMCreatePixmapFromRImage(WMScreen *scrPtr, RImage *image, int threshold)
|
||||
}
|
||||
|
||||
|
||||
WMPixmap*
|
||||
WMCreateBlendedPixmapFromRImage(WMScreen *scrPtr, RImage *image, RColor *color)
|
||||
{
|
||||
WMPixmap *pixPtr;
|
||||
RImage *copy;
|
||||
|
||||
copy = RCloneImage(image);
|
||||
RCombineImageWithColor(copy, color);
|
||||
pixPtr = WMCreatePixmapFromRImage(scrPtr, copy, 0);
|
||||
RDestroyImage(copy);
|
||||
|
||||
return pixPtr;
|
||||
}
|
||||
|
||||
|
||||
WMPixmap*
|
||||
WMCreateBlendedPixmapFromFile(WMScreen *scrPtr, char *fileName, RColor *color)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user