2 * Copyright 2014 Google Inc.
3 * Copyright 2015 Xamarin Inc.
4 * Copyright 2017 Microsoft Corporation. All rights reserved.
6 * Use of this source code is governed by a BSD-style license that can be
7 * found in the LICENSE file.
10 #ifndef sk_document_DEFINED
11 #define sk_document_DEFINED
15 SK_C_PLUS_PLUS_BEGIN_GUARD
17 SK_C_API void sk_document_unref(sk_document_t* document);
19 SK_C_API sk_document_t* sk_document_create_pdf_from_stream(sk_wstream_t* stream, float dpi);
20 SK_C_API sk_document_t* sk_document_create_pdf_from_stream_with_metadata(sk_wstream_t* stream, float dpi, const sk_document_pdf_metadata_t* metadata);
21 SK_C_API sk_document_t* sk_document_create_pdf_from_filename(const char* path, float dpi);
23 SK_C_API sk_document_t* sk_document_create_xps_from_stream(sk_wstream_t* stream, float dpi);
25 SK_C_API sk_canvas_t* sk_document_begin_page(sk_document_t* document, float width, float height, const sk_rect_t* content);
26 SK_C_API void sk_document_end_page(sk_document_t* document);
27 SK_C_API void sk_document_close(sk_document_t* document);
28 SK_C_API void sk_document_abort(sk_document_t* document);
30 SK_C_PLUS_PLUS_END_GUARD