Rework color translation to support gray scale and bitmaps
(cherry picked from commit 49f72c1fb4bf90fde0ba9c4b40794672b775d2a8)
This commit is contained in:
@ -262,14 +262,14 @@ gdk_window_impl_quartz_begin_paint_region (GdkPaintable *paintable,
|
||||
if (bg_pixmap == NULL)
|
||||
{
|
||||
CGContextRef cg_context;
|
||||
CGFloat r, g, b, a;
|
||||
CGColorRef color;
|
||||
gint i;
|
||||
|
||||
cg_context = gdk_quartz_drawable_get_context (GDK_DRAWABLE (impl), FALSE);
|
||||
_gdk_quartz_colormap_get_rgba_from_pixel (gdk_drawable_get_colormap (window),
|
||||
private->bg_color.pixel,
|
||||
&r, &g, &b, &a);
|
||||
CGContextSetRGBFillColor (cg_context, r, g, b, a);
|
||||
color = _gdk_quartz_colormap_get_cgcolor_from_pixel (window,
|
||||
private->bg_color.pixel);
|
||||
CGContextSetFillColorWithColor (cg_context, color);
|
||||
CGColorRelease (color);
|
||||
|
||||
for (i = 0; i < n_rects; i++)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user