Updated: Sudoku no longer crashes
[moon.git] / cairo / src / cairo-ps-surface-private.h
blobe78833d05cb3a57b4fb4993f8ca6ee765d723b34
1 /* -*- Mode: c; tab-width: 8; c-basic-offset: 4; indent-tabs-mode: t; -*- */
2 /* cairo - a vector graphics library with display and print output
4 * Copyright © 2003 University of Southern California
5 * Copyright © 2005 Red Hat, Inc
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.
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 * You should have received a copy of the MPL along with this library
19 * in the file COPYING-MPL-1.1
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/
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.
30 * The Original Code is the cairo graphics library.
32 * The Initial Developer of the Original Code is University of Southern
33 * California.
35 * Contributor(s):
36 * Carl D. Worth <cworth@cworth.org>
37 * Kristian Høgsberg <krh@redhat.com>
38 * Keith Packard <keithp@keithp.com>
41 #ifndef CAIRO_PS_SURFACE_PRIVATE_H
42 #define CAIRO_PS_SURFACE_PRIVATE_H
44 #include "cairo-ps.h"
46 #include "cairo-surface-private.h"
47 #include "cairo-pdf-operators-private.h"
49 #include <time.h>
51 typedef struct cairo_ps_surface {
52 cairo_surface_t base;
54 /* Here final_stream corresponds to the stream/file passed to
55 * cairo_ps_surface_create surface is built. Meanwhile stream is a
56 * temporary stream in which the file output is built, (so that
57 * the header can be built and inserted into the target stream
58 * before the contents of the temporary stream are copied). */
59 cairo_output_stream_t *final_stream;
61 FILE *tmpfile;
62 cairo_output_stream_t *stream;
64 cairo_bool_t eps;
65 cairo_content_t content;
66 double width;
67 double height;
68 int bbox_x1, bbox_y1, bbox_x2, bbox_y2;
69 cairo_matrix_t cairo_to_ps;
70 cairo_image_surface_t *image;
71 void *image_extra;
72 cairo_bool_t use_string_datasource;
74 cairo_bool_t current_pattern_is_solid_color;
75 cairo_color_t current_color;
77 int num_pages;
79 cairo_paginated_mode_t paginated_mode;
81 cairo_bool_t force_fallbacks;
82 cairo_bool_t has_creation_date;
83 time_t creation_date;
85 cairo_scaled_font_subsets_t *font_subsets;
87 cairo_array_t dsc_header_comments;
88 cairo_array_t dsc_setup_comments;
89 cairo_array_t dsc_page_setup_comments;
91 cairo_array_t *dsc_comment_target;
93 cairo_ps_level_t ps_level;
94 cairo_ps_level_t ps_level_used;
96 cairo_pdf_operators_t pdf_operators;
97 cairo_surface_t *paginated_surface;
98 } cairo_ps_surface_t;
100 #endif /* CAIRO_PS_SURFACE_PRIVATE_H */