mirror of
https://github.com/gnustep/libs-back.git
synced 2025-05-31 09:21:26 +00:00
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:
parent
4092f464f4
commit
850e3c20d1
3 changed files with 14 additions and 7 deletions
|
@ -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;
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue