blob: d868e6725672ceefb5b108afe1c2eec4b2dbeddb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
/* SPDX-License-Identifier: GPL-2.0-or-later
* Copyright 2020 Blender Foundation. All rights reserved. */
#pragma once
/** \file
* \ingroup bgpencil
*/
#include "gpencil_io_import_base.hh"
struct GpencilIOParams;
struct NSVGpath;
struct NSVGshape;
struct bGPDframe;
struct bGPdata;
#define SVG_IMPORTER_NAME "SVG Import for Grease Pencil"
#define SVG_IMPORTER_VERSION "v1.0"
namespace blender::io::gpencil {
class GpencilImporterSVG : public GpencilImporter {
public:
GpencilImporterSVG(const char *filepath, const struct GpencilIOParams *iparams);
bool read();
protected:
private:
void create_stroke(struct bGPdata *gpd_,
struct bGPDframe *gpf,
struct NSVGshape *shape,
struct NSVGpath *path,
int32_t mat_index,
const float matrix[4][4]);
void convert_color(int32_t color, float r_linear_rgba[4]);
};
} // namespace blender::io::gpencil
|