Subversion Repositories Scribus

Rev

Rev 14952 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
14952 fschmid 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
 *
6
 * This library is free software; you can redistribute it and/or
7
 * modify it either under the terms of the GNU Lesser General Public
8
 * License version 2.1 as published by the Free Software Foundation
9
 * (the "LGPL") or, at your option, under the terms of the Mozilla
10
 * Public License Version 1.1 (the "MPL"). If you do not alter this
11
 * notice, a recipient may use your version of this file under either
12
 * the MPL or the LGPL.
13
 *
14
 * You should have received a copy of the LGPL along with this library
15
 * in the file COPYING-LGPL-2.1; if not, write to the Free Software
18122 mrdocs 16
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
14952 fschmid 17
 * You should have received a copy of the MPL along with this library
18
 * in the file COPYING-MPL-1.1
19
 *
20
 * The contents of this file are subject to the Mozilla Public License
21
 * Version 1.1 (the "License"); you may not use this file except in
22
 * compliance with the License. You may obtain a copy of the License at
23
 * http://www.mozilla.org/MPL/
24
 *
25
 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY
26
 * OF ANY KIND, either express or implied. See the LGPL or the MPL for
27
 * the specific language governing rights and limitations.
28
 *
29
 * The Original Code is the cairo graphics library.
30
 *
31
 * The Initial Developer of the Original Code is University of Southern
32
 * California.
33
 *
34
 * Contributor(s):
35
 *      Carl D. Worth <cworth@cworth.org>
36
 */
37
 
38
#ifndef CAIRO_SURFACE_PRIVATE_H
39
#define CAIRO_SURFACE_PRIVATE_H
40
 
41
#include "cairo.h"
42
 
43
#include "cairo-types-private.h"
44
#include "cairo-reference-count-private.h"
45
#include "cairo-clip-private.h"
46
 
47
typedef void (*cairo_surface_func_t) (cairo_surface_t *);
48
 
49
struct _cairo_surface {
50
    const cairo_surface_backend_t *backend;
51
 
52
    /* We allow surfaces to override the backend->type by shoving something
53
     * else into surface->type. This is for "wrapper" surfaces that want to
54
     * hide their internal type from the user-level API. */
55
    cairo_surface_type_t type;
56
 
57
    cairo_content_t content;
58
 
59
    cairo_reference_count_t ref_count;
60
    cairo_status_t status;
61
    cairo_bool_t finished;
62
    unsigned int unique_id;
63
 
64
    cairo_user_data_array_t user_data;
65
    cairo_user_data_array_t mime_data;
66
 
67
    cairo_matrix_t device_transform;
68
    cairo_matrix_t device_transform_inverse;
69
 
70
    /* The actual resolution of the device, in dots per inch. */
71
    double x_resolution;
72
    double y_resolution;
73
 
74
    /* The resolution that should be used when generating image-based
75
     * fallback; generally only used by the analysis/paginated
76
     * surfaces
77
     */
78
    double x_fallback_resolution;
79
    double y_fallback_resolution;
80
 
81
    /* A "snapshot" surface is immutable. See _cairo_surface_snapshot. */
82
    cairo_surface_t *snapshot_of;
83
    cairo_surface_func_t snapshot_detach;
84
    /* current snapshots of this surface */
85
    cairo_array_t snapshots;
86
 
87
    /*
88
     * Surface font options, falling back to backend's default options,
89
     * and set using _cairo_surface_set_font_options(), and propagated by
90
     * cairo_surface_create_similar().
91
     */
92
    cairo_bool_t has_font_options;
93
    cairo_font_options_t font_options;
94
};
95
 
96
#endif /* CAIRO_SURFACE_PRIVATE_H */