Blender  V3.3
gpencil_io_export_pdf.hh
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later
2  * Copyright 2020 Blender Foundation. All rights reserved. */
3 #pragma once
4 
10 #include "hpdf.h"
11 
12 struct GpencilIOParams;
13 struct bGPDlayer;
14 struct bGPDstroke;
15 
16 #define PDF_EXPORTER_NAME "PDF Exporter for Grease Pencil"
17 #define PDF_EXPORTER_VERSION "v1.0"
18 
19 namespace blender::io::gpencil {
20 
22 
23  public:
24  GpencilExporterPDF(const char *filepath, const struct GpencilIOParams *iparams);
25  bool new_document();
26  bool add_newpage();
27  bool add_body();
28  bool write();
29 
30  protected:
31  private:
33  HPDF_Doc pdf_;
35  HPDF_Page page_;
36 
38  bool create_document();
40  bool add_page();
42  void export_gpencil_layers();
43 
48  void export_stroke_to_polyline(
49  bGPDlayer *gpl, bGPDstroke *gps, bool is_stroke, bool do_fill, bool normalize);
54  void color_set(bGPDlayer *gpl, bool do_fill);
55 };
56 
57 } // namespace blender::io::gpencil
GpencilExporterPDF(const char *filepath, const struct GpencilIOParams *iparams)
vec_base< T, Size > normalize(const vec_base< T, Size > &v)