[win32] remove ignore_operators flag from win32 printing surface

Remove the ignore_operators fallback-avoiding workaround; if apps
want that same behaviour, they'll have to implement it themselves
by taking care when calling cairo_set_operator().
This commit is contained in:
Vladimir Vukicevic 2007-09-21 11:18:17 -07:00
parent b12ed375cf
commit 61ba63f3a0
3 changed files with 6 additions and 18 deletions

View file

@ -147,11 +147,10 @@ _cairo_win32_printing_surface_analyze_operation (cairo_win32_surface_t *surface,
op == CAIRO_OPERATOR_CLEAR)
return CAIRO_STATUS_SUCCESS;
/* If IGNORE_OPERATORS was set, then we pretend everything is
* OVER/SOURCE. Otherwise, we go to fallback.
/* If the operation is anything other than CLEAR, SOURCE, or
* OVER, we have to go to fallback.
*/
if (!(surface->flags & CAIRO_WIN32_SURFACE_IGNORE_OPERATORS) &&
op != CAIRO_OPERATOR_OVER)
if (op != CAIRO_OPERATOR_OVER)
return CAIRO_INT_STATUS_UNSUPPORTED;
/* CAIRO_OPERATOR_OVER is only supported for opaque patterns. If
@ -1084,8 +1083,6 @@ _cairo_win32_printing_surface_set_paginated_mode (void *abstract_surface,
/**
* cairo_win32_printing_surface_create:
* @hdc: the DC to create a surface for
* @ignore_operators: whether operators other than CLEAR and OVER
* should be treated as SOURCE
*
* Creates a cairo surface that targets the given DC. The DC will be
* queried for its initial clip extents, and this will be used as the
@ -1097,13 +1094,10 @@ _cairo_win32_printing_surface_set_paginated_mode (void *abstract_surface,
* provide correct complex renderinf behaviour; show_page() and
* associated methods must be used for correct output.
*
* If ignore_operators is TRUE, the rendering may be incorrect;
* however, the chances of hitting fallback code are much reduced.
*
* Return value: the newly created surface
**/
cairo_surface_t *
cairo_win32_printing_surface_create (HDC hdc, cairo_bool_t ignore_operators)
cairo_win32_printing_surface_create (HDC hdc)
{
cairo_win32_surface_t *surface;
RECT rect;
@ -1155,8 +1149,6 @@ cairo_win32_printing_surface_create (HDC hdc, cairo_bool_t ignore_operators)
surface->flags = _cairo_win32_flags_for_dc (surface->dc);
surface->flags |= CAIRO_WIN32_SURFACE_FOR_PRINTING;
if (ignore_operators)
surface->flags |= CAIRO_WIN32_SURFACE_IGNORE_OPERATORS;
surface->clip_saved_dc = 0;
_cairo_win32_printing_surface_init_ps_mode (surface);

View file

@ -108,11 +108,6 @@ enum {
/* Whether we can use GradientFill rectangles with this surface */
CAIRO_WIN32_SURFACE_CAN_RECT_GRADIENT = (1<<6),
/* If we should treat all operators other than CLEAR and OVER
* like SOURCE to avoid hitting fallback. Ignored except
* for printing. */
CAIRO_WIN32_SURFACE_IGNORE_OPERATORS = (1<<7)
};
cairo_status_t

View file

@ -1,3 +1,4 @@
/* -*- Mode: c; tab-width: 8; c-basic-offset: 4; indent-tabs-mode: t; -*- */
/* cairo - a vector graphics library with display and print output
*
* Copyright © 2005 Red Hat, Inc
@ -48,7 +49,7 @@ cairo_public cairo_surface_t *
cairo_win32_surface_create (HDC hdc);
cairo_public cairo_surface_t *
cairo_win32_printing_surface_create (HDC hdc, cairo_bool_t ignore_operators);
cairo_win32_printing_surface_create (HDC hdc);
cairo_public cairo_surface_t *
cairo_win32_surface_create_with_ddb (HDC hdc,