Classes | |
| struct | LinesPath |
| struct | DashesParam |
Functions | |
| bool | is_line (const float *p, float precision=1e-4f) |
| LinesPath | linearize_path (NSVGpath *first_path, const NSVGLineParams ¶m) |
| HealedExPolygons | fill_to_expolygons (const LinesPath &lines_path, const NSVGshape &shape, const NSVGLineParams ¶m) |
| HealedExPolygons | stroke_to_expolygons (const LinesPath &lines_path, const NSVGshape &shape, const NSVGLineParams ¶m) |
| Point::coord_type | to_coor (float val, double scale) |
| bool | need_flattening (float tessTol, const Vec2f &p1, const Vec2f &p2, const Vec2f &p3, const Vec2f &p4) |
| void | flatten_cubic_bez (Points &points, float tessTol, const Vec2f &p1, const Vec2f &p2, const Vec2f &p3, const Vec2f &p4, int level) |
| Convert cubic curve to lines Inspired by nanosvgrast.h function nsvgRasterize -> nsvg__flattenShape -> nsvg__flattenCubicBez https://github.com/memononen/nanosvg/blob/f0a3e1034dd22e2e87e5db22401e44998383124e/src/nanosvgrast.h#L335. | |
| Polylines | to_dashes (const Polyline &polyline, const DashesParam ¶m) |
| struct anonymous_namespace{NSVGUtils.cpp}::LinesPath |
| HealedExPolygons anonymous_namespace{NSVGUtils.cpp}::fill_to_expolygons | ( | const LinesPath & | lines_path, |
| const NSVGshape & | shape, | ||
| const NSVGLineParams & | param ) |
References Slic3r::Emboss::heal_polygons(), Slic3r::NSVGLineParams::max_heal_iteration, anonymous_namespace{NSVGUtils.cpp}::LinesPath::polygons, Slic3r::polygons_append(), anonymous_namespace{NSVGUtils.cpp}::LinesPath::polylines, and Slic3r::to_polygons().
| void anonymous_namespace{NSVGUtils.cpp}::flatten_cubic_bez | ( | Points & | points, |
| float | tessTol, | ||
| const Vec2f & | p1, | ||
| const Vec2f & | p2, | ||
| const Vec2f & | p3, | ||
| const Vec2f & | p4, | ||
| int | level ) |
Convert cubic curve to lines Inspired by nanosvgrast.h function nsvgRasterize -> nsvg__flattenShape -> nsvg__flattenCubicBez https://github.com/memononen/nanosvg/blob/f0a3e1034dd22e2e87e5db22401e44998383124e/src/nanosvgrast.h#L335.
| polygon | Result points |
| tessTol | Tesselation tolerance |
| p1 | Curve point |
| p2 | Curve point |
| p3 | Curve point |
| p4 | Curve point |
| level | Actual depth of recursion |
References flatten_cubic_bez(), and need_flattening().
Referenced by flatten_cubic_bez(), and linearize_path().
| bool anonymous_namespace{NSVGUtils.cpp}::is_line | ( | const float * | p, |
| float | precision = 1e-4f ) |
References Slic3r::is_approx().
Referenced by linearize_path(), and to_dashes().
| LinesPath anonymous_namespace{NSVGUtils.cpp}::linearize_path | ( | NSVGpath * | first_path, |
| const NSVGLineParams & | param ) |
References flatten_cubic_bez(), is_line(), Slic3r::NSVGLineParams::is_y_negative, Slic3r::NSVGLineParams::max_level, anonymous_namespace{NSVGUtils.cpp}::LinesPath::polygons, anonymous_namespace{NSVGUtils.cpp}::LinesPath::polylines, Slic3r::remove_same_neighbor(), Slic3r::NSVGLineParams::scale, Slic3r::NSVGLineParams::tesselation_tolerance, and to_coor().
| bool anonymous_namespace{NSVGUtils.cpp}::need_flattening | ( | float | tessTol, |
| const Vec2f & | p1, | ||
| const Vec2f & | p2, | ||
| const Vec2f & | p3, | ||
| const Vec2f & | p4 ) |
References Slic3r::f().
Referenced by flatten_cubic_bez().
| HealedExPolygons anonymous_namespace{NSVGUtils.cpp}::stroke_to_expolygons | ( | const LinesPath & | lines_path, |
| const NSVGshape & | shape, | ||
| const NSVGLineParams & | param ) |
References Slic3r::contour_to_polygons(), Slic3r::etOpenButt, Slic3r::etOpenRound, Slic3r::etOpenSquare, Slic3r::Emboss::heal_polygons(), Slic3r::jtMiter, Slic3r::jtRound, Slic3r::jtSquare, Slic3r::NSVGLineParams::max_heal_iteration, Slic3r::offset(), anonymous_namespace{NSVGUtils.cpp}::LinesPath::polygons, Slic3r::polygons_append(), anonymous_namespace{NSVGUtils.cpp}::LinesPath::polylines, Slic3r::polylines_append(), Slic3r::NSVGLineParams::scale, Slic3r::NSVGLineParams::tesselation_tolerance, to_dashes(), and Slic3r::to_polyline().
| Point::coord_type anonymous_namespace{NSVGUtils.cpp}::to_coor | ( | float | val, |
| double | scale ) |
References scale().
Referenced by linearize_path().
| Polylines anonymous_namespace{NSVGUtils.cpp}::to_dashes | ( | const Polyline & | polyline, |
| const DashesParam & | param ) |
References Slic3r::Polyline::append(), Slic3r::Polyline::clear(), anonymous_namespace{NSVGUtils.cpp}::DashesParam::dash_array, anonymous_namespace{NSVGUtils.cpp}::DashesParam::dash_count, anonymous_namespace{NSVGUtils.cpp}::DashesParam::dash_index, anonymous_namespace{NSVGUtils.cpp}::DashesParam::dash_length, Slic3r::diff(), Slic3r::MultiPoint::empty(), anonymous_namespace{NSVGUtils.cpp}::DashesParam::is_line, is_line(), and Slic3r::MultiPoint::points.
Referenced by stroke_to_expolygons().