/* We use the x and y parts of extents for situations where * we're not supposed to draw to the entire surface. * For example, during a paint event a program will get * a DC that has been clipped to the dirty region. * A cairo surface constructed for that DC will have extents * that match bounds of the clipped region.
*/
cairo_rectangle_int_t extents;
/* Offset added to extents, used when the extents start with a negative * offset, which can occur on Windows for, and only for, desktop DC. This * occurs when you have multiple monitors, and at least one monitor * extends to the left, or above, the primaty monitor. The primary * monitor on Windows always starts with offset (0,0), and any other points * to the left, or above, have negative offsets. So the 'desktop DC' is * in fact a 'virtual desktop' which can start with extents in the negative * range. * * Why use new variables, and not the device transform? Simply because since * the device transform functions are exposed, a lot of 3rd party libraries * simply overwrite those, disregarding the prior content, instead of actually * adding the offset. GTK for example simply resets the device transform of the * desktop cairo surface to zero. So make some private member variables for * this, which will not be fiddled with externally.
*/ int x_ofs, y_ofs;
} cairo_win32_surface_t; #define to_win32_surface(S) ((cairo_win32_surface_t *)(S))
/* We create off-screen surfaces as DIBs or DDBs, based on what we created
* originally */
HBITMAP bitmap;
cairo_bool_t is_dib;
/* Used to save the initial 1x1 monochrome bitmap for the DC to * select back into the DC before deleting the DC and our * bitmap. For Windows XP, this doesn't seem to be necessary * ... we can just delete the DC and that automatically unselects * our bitmap. But it's standard practice so apparently is needed * on some versions of Windows.
*/
HBITMAP saved_dc_bitmap;
cairo_surface_t *image;
cairo_surface_t *fallback;
typedefBOOL (WINAPI *cairo_win32_alpha_blend_func_t) (HDC hdcDest, int nXOriginDest, int nYOriginDest, int nWidthDest, int hHeightDest,
HDC hdcSrc, int nXOriginSrc, int nYOriginSrc, int nWidthSrc, int nHeightSrc,
BLENDFUNCTION blendFunction);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.