Coverage Report

Created: 2025-07-07 10:01

/work/workdir/UnpackedTarball/cairo/src/cairo-surface-wrapper-private.h
Line
Count
Source (jump to first uncovered line)
1
/* cairo - a vector graphics library with display and print output
2
 *
3
 * Copyright © 2002 University of Southern California
4
 * Copyright © 2005 Red Hat, Inc.
5
 * Copyright © 2009 Chris Wilson
6
 *
7
 * This library is free software; you can redistribute it and/or
8
 * modify it either under the terms of the GNU Lesser General Public
9
 * License version 2.1 as published by the Free Software Foundation
10
 * (the "LGPL") or, at your option, under the terms of the Mozilla
11
 * Public License Version 1.1 (the "MPL"). If you do not alter this
12
 * notice, a recipient may use your version of this file under either
13
 * the MPL or the LGPL.
14
 *
15
 * You should have received a copy of the LGPL along with this library
16
 * in the file COPYING-LGPL-2.1; if not, write to the Free Software
17
 * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA
18
 * You should have received a copy of the MPL along with this library
19
 * in the file COPYING-MPL-1.1
20
 *
21
 * The contents of this file are subject to the Mozilla Public License
22
 * Version 1.1 (the "License"); you may not use this file except in
23
 * compliance with the License. You may obtain a copy of the License at
24
 * http://www.mozilla.org/MPL/
25
 *
26
 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY
27
 * OF ANY KIND, either express or implied. See the LGPL or the MPL for
28
 * the specific language governing rights and limitations.
29
 *
30
 * The Original Code is the cairo graphics library.
31
 *
32
 * The Initial Developer of the Original Code is University of Southern
33
 * California.
34
 *
35
 * Contributor(s):
36
 *  Chris Wilson <chris@chris-wilson.co.u>
37
 */
38
39
#ifndef CAIRO_SURFACE_WRAPPER_PRIVATE_H
40
#define CAIRO_SURFACE_WRAPPER_PRIVATE_H
41
42
#include "cairoint.h"
43
#include "cairo-types-private.h"
44
#include "cairo-surface-backend-private.h"
45
46
CAIRO_BEGIN_DECLS
47
48
struct _cairo_surface_wrapper {
49
    cairo_surface_t *target;
50
51
    cairo_matrix_t transform;
52
53
    cairo_bool_t has_extents;
54
    cairo_rectangle_int_t extents;
55
    const cairo_clip_t *clip;
56
    cairo_pattern_t *foreground_source;
57
58
    cairo_bool_t needs_transform;
59
};
60
61
cairo_private void
62
_cairo_surface_wrapper_init (cairo_surface_wrapper_t *wrapper,
63
           cairo_surface_t *target);
64
65
cairo_private void
66
_cairo_surface_wrapper_intersect_extents (cairo_surface_wrapper_t *wrapper,
67
            const cairo_rectangle_int_t *extents);
68
69
cairo_private void
70
_cairo_surface_wrapper_set_inverse_transform (cairo_surface_wrapper_t *wrapper,
71
                const cairo_matrix_t *transform);
72
73
cairo_private void
74
_cairo_surface_wrapper_set_clip (cairo_surface_wrapper_t *wrapper,
75
         const cairo_clip_t *clip);
76
77
cairo_private void
78
_cairo_surface_wrapper_set_foreground_color (cairo_surface_wrapper_t *wrapper,
79
                                             const cairo_color_t *color);
80
81
cairo_private void
82
_cairo_surface_wrapper_fini (cairo_surface_wrapper_t *wrapper);
83
84
static inline cairo_bool_t
85
_cairo_surface_wrapper_has_fill_stroke (cairo_surface_wrapper_t *wrapper)
86
0
{
87
0
    return wrapper->target->backend->fill_stroke != NULL;
88
0
}
Unexecuted instantiation: cairo-recording-surface.c:_cairo_surface_wrapper_has_fill_stroke
Unexecuted instantiation: cairo-surface-wrapper.c:_cairo_surface_wrapper_has_fill_stroke
89
90
cairo_private cairo_status_t
91
_cairo_surface_wrapper_acquire_source_image (cairo_surface_wrapper_t *wrapper,
92
               cairo_image_surface_t  **image_out,
93
               void                   **image_extra);
94
95
cairo_private void
96
_cairo_surface_wrapper_release_source_image (cairo_surface_wrapper_t *wrapper,
97
               cairo_image_surface_t  *image,
98
               void                   *image_extra);
99
100
101
cairo_private cairo_status_t
102
_cairo_surface_wrapper_paint (cairo_surface_wrapper_t *wrapper,
103
            cairo_operator_t   op,
104
            const cairo_pattern_t *source,
105
            const cairo_clip_t      *clip);
106
107
cairo_private cairo_status_t
108
_cairo_surface_wrapper_mask (cairo_surface_wrapper_t *wrapper,
109
           cairo_operator_t  op,
110
           const cairo_pattern_t *source,
111
           const cairo_pattern_t *mask,
112
           const cairo_clip_t     *clip);
113
114
cairo_private cairo_status_t
115
_cairo_surface_wrapper_stroke (cairo_surface_wrapper_t *wrapper,
116
             cairo_operator_t    op,
117
             const cairo_pattern_t  *source,
118
             const cairo_path_fixed_t *path,
119
             const cairo_stroke_style_t *stroke_style,
120
             const cairo_matrix_t   *ctm,
121
             const cairo_matrix_t   *ctm_inverse,
122
             double      tolerance,
123
             cairo_antialias_t   antialias,
124
             const cairo_clip_t   *clip);
125
126
cairo_private cairo_status_t
127
_cairo_surface_wrapper_fill_stroke (cairo_surface_wrapper_t *wrapper,
128
            cairo_operator_t       fill_op,
129
            const cairo_pattern_t   *fill_source,
130
            cairo_fill_rule_t      fill_rule,
131
            double         fill_tolerance,
132
            cairo_antialias_t      fill_antialias,
133
            const cairo_path_fixed_t*path,
134
            cairo_operator_t       stroke_op,
135
            const cairo_pattern_t   *stroke_source,
136
            const cairo_stroke_style_t    *stroke_style,
137
            const cairo_matrix_t      *stroke_ctm,
138
            const cairo_matrix_t      *stroke_ctm_inverse,
139
            double         stroke_tolerance,
140
            cairo_antialias_t      stroke_antialias,
141
            const cairo_clip_t      *clip);
142
143
cairo_private cairo_status_t
144
_cairo_surface_wrapper_fill (cairo_surface_wrapper_t *wrapper,
145
           cairo_operator_t  op,
146
           const cairo_pattern_t *source,
147
           const cairo_path_fixed_t *path,
148
           cairo_fill_rule_t   fill_rule,
149
           double    tolerance,
150
           cairo_antialias_t   antialias,
151
           const cairo_clip_t *clip);
152
153
cairo_private cairo_status_t
154
_cairo_surface_wrapper_show_text_glyphs (cairo_surface_wrapper_t *wrapper,
155
           cairo_operator_t      op,
156
           const cairo_pattern_t      *source,
157
           const char       *utf8,
158
           int           utf8_len,
159
           const cairo_glyph_t      *glyphs,
160
           int           num_glyphs,
161
           const cairo_text_cluster_t *clusters,
162
           int           num_clusters,
163
           cairo_text_cluster_flags_t  cluster_flags,
164
           cairo_scaled_font_t      *scaled_font,
165
           const cairo_clip_t     *clip);
166
167
cairo_private cairo_status_t
168
_cairo_surface_wrapper_tag (cairo_surface_wrapper_t     *wrapper,
169
          cairo_bool_t                 begin,
170
          const char                  *tag_name,
171
          const char                  *attributes);
172
173
cairo_private cairo_surface_t *
174
_cairo_surface_wrapper_create_similar (cairo_surface_wrapper_t *wrapper,
175
               cairo_content_t  content,
176
               int    width,
177
               int    height);
178
cairo_private cairo_bool_t
179
_cairo_surface_wrapper_get_extents (cairo_surface_wrapper_t *wrapper,
180
            cairo_rectangle_int_t   *extents);
181
182
cairo_private void
183
_cairo_surface_wrapper_get_font_options (cairo_surface_wrapper_t    *wrapper,
184
           cairo_font_options_t     *options);
185
186
cairo_private cairo_surface_t *
187
_cairo_surface_wrapper_snapshot (cairo_surface_wrapper_t *wrapper);
188
189
cairo_private cairo_bool_t
190
_cairo_surface_wrapper_has_show_text_glyphs (cairo_surface_wrapper_t *wrapper);
191
192
static inline cairo_bool_t
193
_cairo_surface_wrapper_is_active (cairo_surface_wrapper_t *wrapper)
194
0
{
195
0
    return wrapper->target != (cairo_surface_t *) 0;
196
0
}
Unexecuted instantiation: cairo-recording-surface.c:_cairo_surface_wrapper_is_active
Unexecuted instantiation: cairo-surface-wrapper.c:_cairo_surface_wrapper_is_active
197
198
cairo_private cairo_bool_t
199
_cairo_surface_wrapper_get_target_extents (cairo_surface_wrapper_t *wrapper,
200
             cairo_bool_t surface_is_unbounded,
201
             cairo_rectangle_int_t *extents);
202
203
CAIRO_END_DECLS
204
205
#endif /* CAIRO_SURFACE_WRAPPER_PRIVATE_H */