Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Blame | Last modification | View Log | Download | RSS feed

  1. /* cairo - a vector graphics library with display and print output
  2.  *
  3.  * Copyright © 2009 Intel Corporation
  4.  *
  5.  * This library is free software; you can redistribute it and/or
  6.  * modify it either under the terms of the GNU Lesser General Public
  7.  * License version 2.1 as published by the Free Software Foundation
  8.  * (the "LGPL") or, at your option, under the terms of the Mozilla
  9.  * Public License Version 1.1 (the "MPL"). If you do not alter this
  10.  * notice, a recipient may use your version of this file under either
  11.  * the MPL or the LGPL.
  12.  *
  13.  * You should have received a copy of the LGPL along with this library
  14.  * in the file COPYING-LGPL-2.1; if not, write to the Free Software
  15.  * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA
  16.  * You should have received a copy of the MPL along with this library
  17.  * in the file COPYING-MPL-1.1
  18.  *
  19.  * The contents of this file are subject to the Mozilla Public License
  20.  * Version 1.1 (the "License"); you may not use this file except in
  21.  * compliance with the License. You may obtain a copy of the License at
  22.  * http://www.mozilla.org/MPL/
  23.  *
  24.  * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY
  25.  * OF ANY KIND, either express or implied. See the LGPL or the MPL for
  26.  * the specific language governing rights and limitations.
  27.  *
  28.  * The Original Code is the cairo graphics library.
  29.  *
  30.  * The Initial Developer of the Original Code is University of Southern
  31.  * California.
  32.  *
  33.  * Contributor(s):
  34.  *      Chris Wilson <chris@chris-wilson.co.u>
  35.  */
  36.  
  37. #ifndef CAIRO_COMPOSITE_RECTANGLES_PRIVATE_H
  38. #define CAIRO_COMPOSITE_RECTANGLES_PRIVATE_H
  39.  
  40. #include "cairo-types-private.h"
  41.  
  42. CAIRO_BEGIN_DECLS
  43.  
  44. /* Rectangles that take part in a composite operation.
  45.  *
  46.  * The source and mask track the extents of the respective patterns in device
  47.  * space. The unbounded rectangle is essentially the clip rectangle. And the
  48.  * intersection of all is the bounded rectangle, which is the minimum extents
  49.  * the operation may require. Whether or not the operation is actually bounded
  50.  * is tracked in the is_bounded boolean.
  51.  *
  52.  */
  53. struct _cairo_composite_rectangles {
  54.     cairo_rectangle_int_t source;
  55.     cairo_rectangle_int_t mask;
  56.     cairo_rectangle_int_t bounded; /* dst */
  57.     cairo_rectangle_int_t unbounded; /* clip */
  58.     uint32_t is_bounded;
  59. };
  60.  
  61. cairo_private cairo_int_status_t
  62. _cairo_composite_rectangles_init_for_paint (cairo_composite_rectangles_t *extents,
  63.                                          int surface_width, int surface_height,
  64.                                          cairo_operator_t        op,
  65.                                          const cairo_pattern_t  *source,
  66.                                          cairo_clip_t           *clip);
  67.  
  68. cairo_private cairo_int_status_t
  69. _cairo_composite_rectangles_init_for_mask (cairo_composite_rectangles_t *extents,
  70.                                         int surface_width, int surface_height,
  71.                                         cairo_operator_t         op,
  72.                                         const cairo_pattern_t   *source,
  73.                                         const cairo_pattern_t   *mask,
  74.                                         cairo_clip_t            *clip);
  75.  
  76. cairo_private cairo_int_status_t
  77. _cairo_composite_rectangles_init_for_stroke (cairo_composite_rectangles_t *extents,
  78.                                              int surface_width, int surface_height,
  79.                                              cairo_operator_t    op,
  80.                                              const cairo_pattern_t      *source,
  81.                                              cairo_path_fixed_t *path,
  82.                                              const cairo_stroke_style_t *style,
  83.                                              const cairo_matrix_t       *ctm,
  84.                                              cairo_clip_t               *clip);
  85.  
  86. cairo_private cairo_int_status_t
  87. _cairo_composite_rectangles_init_for_fill (cairo_composite_rectangles_t *extents,
  88.                                            int surface_width, int surface_height,
  89.                                            cairo_operator_t      op,
  90.                                            const cairo_pattern_t        *source,
  91.                                            cairo_path_fixed_t   *path,
  92.                                            cairo_clip_t         *clip);
  93.  
  94. cairo_private cairo_int_status_t
  95. _cairo_composite_rectangles_init_for_glyphs (cairo_composite_rectangles_t *extents,
  96.                                              int surface_width, int surface_height,
  97.                                              cairo_operator_t            op,
  98.                                              const cairo_pattern_t      *source,
  99.                                              cairo_scaled_font_t        *scaled_font,
  100.                                              cairo_glyph_t              *glyphs,
  101.                                              int                         num_glyphs,
  102.                                              cairo_clip_t               *clip,
  103.                                              cairo_bool_t               *overlap);
  104.  
  105. #endif /* CAIRO_COMPOSITE_RECTANGLES_PRIVATE_H */
  106.