1 diff --git a/gfx/cairo/cairo/src/cairo-win32-private.h b/gfx/cairo/cairo/src/cairo-win32-private.h
2 --- a/gfx/cairo/cairo/src/cairo-win32-private.h
3 +++ b/gfx/cairo/cairo/src/cairo-win32-private.h
6 _cairo_win32_scaled_font_is_bitmap (cairo_scaled_font_t *scaled_font);
10 +// These are the required stubs for windows mobile
11 +#define ETO_GLYPH_INDEX 0
13 +#define HALFTONE COLORONCOLOR
14 +#define GM_ADVANCED 2
15 +#define MWT_IDENTITY 1
17 +inline int SetGraphicsMode(HDC hdc, int iMode) {return 1;}
18 +inline int GetGraphicsMode(HDC hdc) {return 1;} /*GM_COMPATIBLE*/
19 +inline void GdiFlush() {}
20 +inline BOOL SetWorldTransform(HDC hdc, CONST XFORM *lpXform) { return FALSE; }
21 +inline BOOL GetWorldTransform(HDC hdc, LPXFORM lpXform ) { return FALSE; }
22 +inline BOOL ModifyWorldTransform(HDC hdc, CONST XFORM * lpxf, DWORD mode) { return 1; }
26 #endif /* CAIRO_WIN32_PRIVATE_H */
27 diff --git a/gfx/cairo/cairo/src/cairo-win32-surface.c b/gfx/cairo/cairo/src/cairo-win32-surface.c
28 --- a/gfx/cairo/cairo/src/cairo-win32-surface.c
29 +++ b/gfx/cairo/cairo/src/cairo-win32-surface.c
30 @@ -1591,8 +1591,25 @@
31 return _cairo_error (CAIRO_STATUS_NO_MEMORY);
33 /* AND the new region into our DC */
36 if (ExtSelectClipRgn (surface->dc, gdi_region, RGN_AND) == ERROR)
37 status = _cairo_win32_print_gdi_error ("_cairo_win32_surface_set_clip_region");
39 + // The ExtSelectClipRgn function combines the specified
40 + // region with the current clipping region using the
41 + // specified mode. Here we do similar using basic
42 + // functions available on WINCE.
44 + HRGN currentClip, newClip;
45 + GetClipRgn(surface->dc, ¤tClip);
47 + if (CombineRgn(newClip, currentClip, gdi_region, RGN_AND) != ERROR) {
48 + SelectClipRgn(surface->dc, newClip);
49 + DeleteObject(newClip);
54 DeleteObject (gdi_region);
57 cairo_scaled_font_t *scaled_font,
58 int *remaining_glyphs)
60 -#if CAIRO_HAS_WIN32_FONT
61 +#if defined(CAIRO_HAS_WIN32_FONT) && !defined(WINCE)
62 cairo_win32_surface_t *dst = surface;
64 WORD glyph_buf_stack[STACK_GLYPH_SIZE];