OrcaSlicer latest
OrcaSlicer
Loading...
Searching...
No Matches
Slic3r::EmbossShape::SvgFile Struct Reference

#include </home/runner/work/OrcaSlicer/OrcaSlicer/src/libslic3r/EmbossShape.hpp>

Collaboration diagram for Slic3r::EmbossShape::SvgFile:

Public Member Functions

template<class Archive>
void save (Archive &ar) const
template<class Archive>
void load (Archive &ar)

Public Attributes

std::string path
std::string path_in_3mf
std::shared_ptr< NSVGimage > image = nullptr
std::shared_ptr< std::string > file_data = nullptr

Detailed Description

Member Function Documentation

◆ load()

template<class Archive>
void Slic3r::EmbossShape::SvgFile::load ( Archive & ar)
inline
113 {
114 // for restore shared pointer on file data
115 std::string file_data_str;
116 ar(path, path_in_3mf, file_data_str);
117 if (!file_data_str.empty())
118 file_data = std::make_unique<std::string>(file_data_str);
119 }
std::string path
Definition EmbossShape.hpp:92
std::string path_in_3mf
Definition EmbossShape.hpp:97
std::shared_ptr< std::string > file_data
Definition EmbossShape.hpp:104

References file_data, path, and path_in_3mf.

◆ save()

template<class Archive>
void Slic3r::EmbossShape::SvgFile::save ( Archive & ar) const
inline
106 {
107 // Note: image is only cache it is not neccessary to store
108
109 // Store file data as plain string
110 // For Embossed text file_data are nullptr
111 ar(path, path_in_3mf, (file_data != nullptr) ? *file_data : std::string(""));
112 }

References file_data, path, and path_in_3mf.

Member Data Documentation

◆ file_data

std::shared_ptr<std::string> Slic3r::EmbossShape::SvgFile::file_data = nullptr

◆ image

std::shared_ptr<NSVGimage> Slic3r::EmbossShape::SvgFile::image = nullptr

◆ path

◆ path_in_3mf


The documentation for this struct was generated from the following file: