Blender  V3.3
gpencil_io_export_svg.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 
8 #include "BLI_path_util.h"
9 
11 #include "pugixml.hpp"
12 
13 struct GpencilIOParams;
14 
15 #define SVG_EXPORTER_NAME "SVG Export for Grease Pencil"
16 #define SVG_EXPORTER_VERSION "v1.0"
17 
18 namespace blender::io::gpencil {
19 
21 
22  public:
23  GpencilExporterSVG(const char *filepath, const struct GpencilIOParams *iparams);
24  bool add_newpage();
25  bool add_body();
26  bool write();
27 
28  protected:
39  static void add_rect(pugi::xml_node node,
40  float x,
41  float y,
42  float width,
43  float height,
44  float thickness,
45  std::string hexcolor);
46 
56  static void add_text(
57  pugi::xml_node node, float x, float y, std::string text, float size, std::string hexcolor);
58 
59  private:
61  pugi::xml_document main_doc_;
63  pugi::xml_node main_node_;
65  pugi::xml_node frame_node_;
67  void create_document_header();
69  void export_gpencil_layers();
70 
76  void export_stroke_to_path(struct bGPDlayer *gpl,
77  struct bGPDstroke *gps,
78  pugi::xml_node node_gpl,
79  bool do_fill);
80 
86  void export_stroke_to_polyline(struct bGPDlayer *gpl,
87  struct bGPDstroke *gps,
88  pugi::xml_node node_gpl,
89  bool is_stroke,
90  bool do_fill);
91 
97  void color_string_set(struct bGPDlayer *gpl,
98  struct bGPDstroke *gps,
99  pugi::xml_node node_gps,
100  bool do_fill);
101 
103  std::string rgb_to_hexstr(const float color[3]);
104 };
105 
106 } // namespace blender::io::gpencil
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei height
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint y
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei width
Group Output data from inside of a node group A color picker Mix two input colors RGB to Convert a color s luminance to a grayscale value Generate a normal vector and a dot product Bright Control the brightness and contrast of the input color Vector Map an input vectors to used to fine tune the interpolation of the input Camera Retrieve information about the camera and how it relates to the current shading point s position Clamp a value between a minimum and a maximum Vector Perform vector math operation Invert a color
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
Definition: btDbvt.cpp:52
GpencilExporterSVG(const char *filepath, const struct GpencilIOParams *iparams)
static void add_rect(pugi::xml_node node, float x, float y, float width, float height, float thickness, std::string hexcolor)
static void add_text(pugi::xml_node node, float x, float y, std::string text, float size, std::string hexcolor)
OperationNode * node