Use drawing depth from window.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@25518 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Fred Kiefer 2007-10-05 14:02:31 +00:00
parent 7edb569d70
commit 69745597e4
3 changed files with 14 additions and 7 deletions

View file

@ -1,3 +1,10 @@
2007-10-05 Fred Kiefer <FredKiefer@gmx.de>
* Source/cairo/CairoGState.m (-copyWithZone:): Only use cairo 1.4
functions when cairo version fits.
* Source/cairo/XGCairoXImageSurface.m (-initWithDevice:): Use
depth from window device.
2007-10-01 Fred Kiefer <FredKiefer@gmx.de>
* Source/x11/XGDragView.m: Add missing include.
@ -50,7 +57,7 @@
* configure.ac,
* configure: Move checking for Xrender extension.
* Source/cairo/XGCairoXImageSurface.m: Add includefor config.h.
* Source/cairo/XGCairoXImageSurface.m: Add include for config.h.
Patch by Yen-Ju Chen <yjchenx@gmail.com>.
2007-09-04 Fred Kiefer <FredKiefer@gmx.de>

View file

@ -148,6 +148,7 @@
cairo_set_line_join(copy->_ct, cairo_get_line_join(_ct));
cairo_set_miter_limit(copy->_ct, cairo_get_miter_limit(_ct));
#if CAIRO_VERSION > CAIRO_VERSION_ENCODE(1, 4, 0)
// In cairo 1.4 there is a way get the dash.
num_dashes = cairo_get_dash_count(_ct);
if (num_dashes != 0)
@ -186,6 +187,7 @@
}
cairo_rectangle_list_destroy(clip_rects);
}
#endif
}
return copy;

View file

@ -36,15 +36,13 @@
gsDevice = device;
#ifdef XRENDER
di.drawing_depth = 32;
#else
di.drawing_depth = 24;
#endif
di.drawing_depth = GSWINDEVICE->depth;
// FIXME: The next four lines may be wrong for depth <> 32.
// But then art uses a depth of 24 for 32 bit modes. Strange!
di.bytes_per_pixel = 4;
di.inline_alpha = YES;
di.inline_alpha_ofs = 0;
// This method is somewhat special as it does not return an autoreleased object
// FIXME: This method is somewhat special as it does not return an autoreleased object
wi = [XWindowBuffer windowBufferForWindow: GSWINDEVICE depthInfo: &di];
_surface = cairo_image_surface_create_for_data((unsigned char*)wi->data,