mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-02-15 20:50:38 +01:00
[pdf] Move cairo_pdf_surface_t to cairo-pdf-surface-private.h
This commit is contained in:
parent
183c6af4f1
commit
68e2158aae
6 changed files with 90 additions and 45 deletions
|
|
@ -21,7 +21,8 @@ endif
|
|||
|
||||
if CAIRO_HAS_PDF_SURFACE
|
||||
libcairo_pdf_headers = cairo-pdf.h
|
||||
libcairo_pdf_sources = cairo-pdf-surface.c cairo-deflate-stream.c cairo-pdf-test.h
|
||||
libcairo_pdf_sources = cairo-pdf-surface.c cairo-pdf-surface-private.h \
|
||||
cairo-deflate-stream.c cairo-pdf-test.h
|
||||
libcairo_font_subset_sources = $(font_subset_sources)
|
||||
backend_pkgconfigs += cairo-pdf.pc
|
||||
endif
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@
|
|||
#ifndef CAIRO_OUTPUT_STREAM_PRIVATE_H
|
||||
#define CAIRO_OUTPUT_STREAM_PRIVATE_H
|
||||
|
||||
typedef struct _cairo_output_stream cairo_output_stream_t;
|
||||
#include "cairo-types-private.h"
|
||||
|
||||
typedef cairo_status_t (*cairo_output_stream_write_func_t) (cairo_output_stream_t *output_stream,
|
||||
const unsigned char *data,
|
||||
|
|
|
|||
83
src/cairo-pdf-surface-private.h
Normal file
83
src/cairo-pdf-surface-private.h
Normal file
|
|
@ -0,0 +1,83 @@
|
|||
/* Cairo - a vector graphics library with display and print output
|
||||
*
|
||||
* Copyright © 2005 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 Red Hat, Inc.
|
||||
*/
|
||||
|
||||
#ifndef CAIRO_PDF_SURFACE_PRIVATE_H
|
||||
#define CAIRO_PDF_SURFACE_PRIVATE_H
|
||||
|
||||
#include "cairo-pdf.h"
|
||||
|
||||
#include "cairo-surface-private.h"
|
||||
|
||||
typedef struct _cairo_pdf_resource {
|
||||
unsigned int id;
|
||||
} cairo_pdf_resource_t;
|
||||
|
||||
typedef struct _cairo_pdf_surface cairo_pdf_surface_t;
|
||||
|
||||
struct _cairo_pdf_surface {
|
||||
cairo_surface_t base;
|
||||
|
||||
/* Prefer the name "output" here to avoid confusion over the
|
||||
* structure within a PDF document known as a "stream". */
|
||||
cairo_output_stream_t *output;
|
||||
|
||||
double width;
|
||||
double height;
|
||||
|
||||
cairo_array_t objects;
|
||||
cairo_array_t pages;
|
||||
cairo_array_t patterns;
|
||||
cairo_array_t xobjects;
|
||||
cairo_array_t streams;
|
||||
cairo_array_t alphas;
|
||||
|
||||
cairo_scaled_font_subsets_t *font_subsets;
|
||||
cairo_array_t fonts;
|
||||
|
||||
cairo_pdf_resource_t next_available_resource;
|
||||
cairo_pdf_resource_t pages_resource;
|
||||
|
||||
struct {
|
||||
cairo_bool_t active;
|
||||
cairo_pdf_resource_t self;
|
||||
cairo_pdf_resource_t length;
|
||||
long start_offset;
|
||||
cairo_bool_t compressed;
|
||||
cairo_output_stream_t *old_output;
|
||||
} current_stream;
|
||||
|
||||
cairo_bool_t has_clip;
|
||||
|
||||
cairo_paginated_mode_t paginated_mode;
|
||||
};
|
||||
|
||||
#endif /* CAIRO_PDF_SURFACE_PRIVATE_H */
|
||||
|
|
@ -39,6 +39,7 @@
|
|||
#include "cairoint.h"
|
||||
#include "cairo-pdf.h"
|
||||
#include "cairo-pdf-test.h"
|
||||
#include "cairo-pdf-surface-private.h"
|
||||
#include "cairo-scaled-font-subsets-private.h"
|
||||
#include "cairo-paginated-surface-private.h"
|
||||
#include "cairo-path-fixed-private.h"
|
||||
|
|
@ -91,53 +92,12 @@ typedef struct _cairo_pdf_object {
|
|||
long offset;
|
||||
} cairo_pdf_object_t;
|
||||
|
||||
typedef struct _cairo_pdf_resource {
|
||||
unsigned int id;
|
||||
} cairo_pdf_resource_t;
|
||||
|
||||
typedef struct _cairo_pdf_font {
|
||||
unsigned int font_id;
|
||||
unsigned int subset_id;
|
||||
cairo_pdf_resource_t subset_resource;
|
||||
} cairo_pdf_font_t;
|
||||
|
||||
typedef struct _cairo_pdf_surface {
|
||||
cairo_surface_t base;
|
||||
|
||||
/* Prefer the name "output" here to avoid confusion over the
|
||||
* structure within a PDF document known as a "stream". */
|
||||
cairo_output_stream_t *output;
|
||||
|
||||
double width;
|
||||
double height;
|
||||
|
||||
cairo_array_t objects;
|
||||
cairo_array_t pages;
|
||||
cairo_array_t patterns;
|
||||
cairo_array_t xobjects;
|
||||
cairo_array_t streams;
|
||||
cairo_array_t alphas;
|
||||
|
||||
cairo_scaled_font_subsets_t *font_subsets;
|
||||
cairo_array_t fonts;
|
||||
|
||||
cairo_pdf_resource_t next_available_resource;
|
||||
cairo_pdf_resource_t pages_resource;
|
||||
|
||||
struct {
|
||||
cairo_bool_t active;
|
||||
cairo_pdf_resource_t self;
|
||||
cairo_pdf_resource_t length;
|
||||
long start_offset;
|
||||
cairo_bool_t compressed;
|
||||
cairo_output_stream_t *old_output;
|
||||
} current_stream;
|
||||
|
||||
cairo_bool_t has_clip;
|
||||
|
||||
cairo_paginated_mode_t paginated_mode;
|
||||
} cairo_pdf_surface_t;
|
||||
|
||||
static cairo_pdf_resource_t
|
||||
_cairo_pdf_surface_new_object (cairo_pdf_surface_t *surface);
|
||||
|
||||
|
|
|
|||
|
|
@ -39,8 +39,6 @@
|
|||
|
||||
#include "cairoint.h"
|
||||
|
||||
typedef struct _cairo_scaled_font_subsets cairo_scaled_font_subsets_t;
|
||||
|
||||
typedef struct _cairo_scaled_font_subsets_glyph {
|
||||
unsigned int font_id;
|
||||
unsigned int subset_id;
|
||||
|
|
|
|||
|
|
@ -59,6 +59,9 @@ struct _cairo_font_options {
|
|||
|
||||
typedef struct _cairo_surface_backend cairo_surface_backend_t;
|
||||
typedef struct _cairo_clip cairo_clip_t;
|
||||
typedef struct _cairo_output_stream cairo_output_stream_t;
|
||||
typedef struct _cairo_scaled_font_subsets cairo_scaled_font_subsets_t;
|
||||
|
||||
|
||||
typedef struct _cairo_xlib_screen_info cairo_xlib_screen_info_t;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue