Bogus fix; misunderstood the relationship between the font bearings
and the computed device offsets. Real fix on my device offsets branch.
This reverts 49b4fe10d0 commit.
cairo-ft-font was being naughty and storing glyph bearings in the
surface device_[xy]_offset fields -- this had no effect previously,
because _cairo_surface_composite ignored those fields, but once it
starts handling device offsets itself, this causes ft text rendering
to break.
All test targets now list an expected cairo_surface_type_t. Add notes
on current limitations of PDF/PS/meta-surface support that causes
CAIRO_CONTENT_COLOR similar surfaces of PDF and PS surfaces to be
returned as image surfaces.
Add cairo_internal_surface_type_t for the meta, paginated, and various
test surfaces.
If the BitBlt in get_image fails, we pretty much can't do anything -- so
fill the destination with white and hope for the best. This enables
somewhat accurate printing of complex operations. Also, check the
destination device caps before calling AlphaBlend; return UNSUPPORTED if
the destination DC can't do AlphaBlend.
(cherry picked from 9831de538e347a624af5b0ca38242b198b64bd45 commit)
If the DC is a display DC, inspect its depth and set out local format
appropriately. If it's not a display DC, assume RGB24.
(cherry picked from 6dd0a70d271f93df95f4bcaff5073b9bf90cecb6 commit)
Fixes up src coords and width/height before calling AlphaBlend/BitBlt; it's
an error to try to use a region that extents outside of the source surface
as a source DC.
Doesn't repair the extra region relative to the operator -- e.g. regions
outside of an ARGB source surface with SOURCE operator should be cleared
to fully transparent black in the destination.
(cherry picked from bc19c5b64b0e38e9d20045907d7b47d79f6afc60 commit)
Adds cairo_win32_surface_create_dib() for creating a win32 DIB-backed
surface with a particular format. Also exposes
cairo_win32_surface_get_dc() to obtain the DC of a win32 surface.
(cherry picked from 0813a1b9b6f35d786fe8cb0d4748771023956cde commit)
mark_dirty will force cairo to set its own clip the next time the cairo clip
is applied after mark_dirty; otherwise we run the risk of cairo's cached
clip and the device clip getting out of sync if any clip-related functions
are used on the native device back-end.
(cherry picked from 1935a28949da8569f924e37714ec19571fa95987 commit)
(cherry picked from ef8b472f0ffab7b8b828d7297c7e454bb22bd5ec commit)
- Save extents at surface creation and always return these
- Simplify clipping paths
(cherry picked from a67722b3d7280e6c2375778c2d46556cca261bfc commit)
(cherry picked from 7ce09732a978749a4da814feb77f50161dc42c91 commit)