OrcaSlicer latest
OrcaSlicer
Loading...
Searching...
No Matches
NSVGUtils.hpp File Reference
#include <cmath>
#include <cstddef>
#include <memory>
#include <string>
#include <sstream>
#include "Point.hpp"
#include "Polygon.hpp"
#include "EmbossShape.hpp"
#include "libslic3r.h"
#include "nanosvg/nanosvg.h"
Include dependency graph for NSVGUtils.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  Slic3r::NSVGLineParams
 Paramreters for conversion curve from SVG to lines in Polygon. More...

Namespaces

namespace  Slic3r
 |/ Copyright (c) Prusa Research 2020 - 2023 Enrico Turri @enricoturri1966 |/ |/ PrusaSlicer is released under the terms of the AGPLv3 or higher |/

Typedefs

using Slic3r::NSVGimage_ptr = std::unique_ptr<NSVGimage, void (*)(NSVGimage*)>

Functions

ExPolygonsWithIds Slic3r::create_shape_with_ids (const NSVGimage &image, const NSVGLineParams &param)
 Convert .svg opened by nanoSvg to shapes stored in expolygons with ids.
Polygons Slic3r::to_polygons (const NSVGimage &image, const NSVGLineParams &param)
 
Parameters
is_y_negativeFlag is y negative, when true than y coor is multiplied by -1

void Slic3r::bounds (const NSVGimage &image, Vec2f &min, Vec2f &max)
std::unique_ptr< std::string > Slic3r::read_from_disk (const std::string &path)
NSVGimage_ptr Slic3r::nsvgParseFromFile (const std::string &filename, const char *units, float dpi)
NSVGimage_ptr Slic3r::nsvgParse (const std::string &file_data, const char *units, float dpi)
NSVGimage * Slic3r::init_image (EmbossShape::SvgFile &svg_file)
size_t Slic3r::get_shapes_count (const NSVGimage &image)
 Iterate over shapes and calculate count.