mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-04-05 19:30:38 +02:00
[svg] Move cairo_svg_surface_t to cairo-svg-surface-private.h
This commit is contained in:
parent
3885fff3e6
commit
7e0ae8bd43
4 changed files with 78 additions and 25 deletions
|
|
@ -30,6 +30,7 @@
|
|||
|
||||
#include <cairo-ps.h>
|
||||
#include <cairo-ps-surface-private.h>
|
||||
#include <cairo-paginated-surface-private.h>
|
||||
|
||||
cairo_user_data_key_t ps_closure_key;
|
||||
|
||||
|
|
@ -142,11 +143,14 @@ _cairo_boilerplate_ps_cleanup (void *closure)
|
|||
cairo_status_t
|
||||
cairo_boilerplate_ps_surface_force_fallbacks (cairo_surface_t *abstract_surface)
|
||||
{
|
||||
cairo_ps_surface_t *surface = (cairo_ps_surface_t*) abstract_surface;
|
||||
cairo_paginated_surface_t *paginated = (cairo_paginated_surface_t*) abstract_surface;
|
||||
cairo_ps_surface_t *surface;
|
||||
|
||||
if (cairo_surface_get_type (abstract_surface) != CAIRO_SURFACE_TYPE_PS)
|
||||
return CAIRO_STATUS_SURFACE_TYPE_MISMATCH;
|
||||
|
||||
surface = (cairo_ps_surface_t*) paginated->target;
|
||||
|
||||
surface->force_fallbacks = TRUE;
|
||||
|
||||
return CAIRO_STATUS_SUCCESS;
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ endif
|
|||
|
||||
if CAIRO_HAS_SVG_SURFACE
|
||||
libcairo_svg_headers = cairo-svg.h
|
||||
libcairo_svg_sources = cairo-svg-surface.c cairo-svg-test.h
|
||||
libcairo_svg_sources = cairo-svg-surface.c cairo-svg-surface-private.h cairo-svg-test.h
|
||||
libcairo_font_subset_sources = $(font_subset_sources)
|
||||
backend_pkgconfigs += cairo-svg.pc
|
||||
endif
|
||||
|
|
|
|||
71
src/cairo-svg-surface-private.h
Normal file
71
src/cairo-svg-surface-private.h
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
/* cairo - a vector graphics library with display and print output
|
||||
*
|
||||
* Copyright © 2004 Red Hat, Inc
|
||||
* Copyright © 2005-2006 Emmanuel Pacaud <emmanuel.pacaud@free.fr>
|
||||
* Copyright © 2006 Red Hat, Inc
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it either under the terms of the GNU Lesser General Public
|
||||
* License version 2.1 as published by the Free Software Foundation
|
||||
* (the "LGPL") or, at your option, under the terms of the Mozilla
|
||||
* Public License Version 1.1 (the "MPL"). If you do not alter this
|
||||
* notice, a recipient may use your version of this file under either
|
||||
* the MPL or the LGPL.
|
||||
*
|
||||
* You should have received a copy of the LGPL along with this library
|
||||
* in the file COPYING-LGPL-2.1; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
* You should have received a copy of the MPL along with this library
|
||||
* in the file COPYING-MPL-1.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY
|
||||
* OF ANY KIND, either express or implied. See the LGPL or the MPL for
|
||||
* the specific language governing rights and limitations.
|
||||
*
|
||||
* The Original Code is the cairo graphics library.
|
||||
*
|
||||
* The Initial Developer of the Original Code is University of Southern
|
||||
* California.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Kristian Høgsberg <krh@redhat.com>
|
||||
* Emmanuel Pacaud <emmanuel.pacaud@univ-poitiers.fr>
|
||||
* Carl Worth <cworth@cworth.org>
|
||||
*/
|
||||
|
||||
#ifndef CAIRO_SVG_SURFACE_PRIVATE_H
|
||||
#define CAIRO_SVG_SURFACE_PRIVATE_H
|
||||
|
||||
#include "cairo-svg.h"
|
||||
|
||||
#include "cairo-surface-private.h"
|
||||
|
||||
typedef struct cairo_svg_document cairo_svg_document_t;
|
||||
|
||||
typedef struct cairo_svg_surface {
|
||||
cairo_surface_t base;
|
||||
|
||||
cairo_content_t content;
|
||||
|
||||
unsigned int id;
|
||||
|
||||
double width;
|
||||
double height;
|
||||
|
||||
cairo_svg_document_t *document;
|
||||
|
||||
cairo_output_stream_t *xml_node;
|
||||
cairo_array_t page_set;
|
||||
|
||||
unsigned int clip_level;
|
||||
unsigned int base_clip;
|
||||
|
||||
cairo_paginated_mode_t paginated_mode;
|
||||
} cairo_svg_surface_t;
|
||||
|
||||
#endif /* CAIRO_SVG_SURFACE_PRIVATE_H */
|
||||
|
|
@ -40,6 +40,7 @@
|
|||
|
||||
#include "cairoint.h"
|
||||
#include "cairo-svg.h"
|
||||
#include "cairo-svg-surface-private.h"
|
||||
#include "cairo-svg-test.h"
|
||||
#include "cairo-path-fixed-private.h"
|
||||
#include "cairo-meta-surface-private.h"
|
||||
|
|
@ -47,8 +48,6 @@
|
|||
#include "cairo-scaled-font-subsets-private.h"
|
||||
#include "cairo-output-stream-private.h"
|
||||
|
||||
typedef struct cairo_svg_document cairo_svg_document_t;
|
||||
typedef struct cairo_svg_surface cairo_svg_surface_t;
|
||||
typedef struct cairo_svg_page cairo_svg_page_t;
|
||||
|
||||
static const int invalid_pattern_id = -1;
|
||||
|
|
@ -115,27 +114,6 @@ struct cairo_svg_document {
|
|||
cairo_scaled_font_subsets_t *font_subsets;
|
||||
};
|
||||
|
||||
struct cairo_svg_surface {
|
||||
cairo_surface_t base;
|
||||
|
||||
cairo_content_t content;
|
||||
|
||||
unsigned int id;
|
||||
|
||||
double width;
|
||||
double height;
|
||||
|
||||
cairo_svg_document_t *document;
|
||||
|
||||
cairo_output_stream_t *xml_node;
|
||||
cairo_array_t page_set;
|
||||
|
||||
unsigned int clip_level;
|
||||
unsigned int base_clip;
|
||||
|
||||
cairo_paginated_mode_t paginated_mode;
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
unsigned int id;
|
||||
cairo_meta_surface_t *meta;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue