Skip to main content

Module svg

Module svg 

Source

Structs§

PathInfo
Stores a set of paths with their rendering attributes. Direct port from C++ PathInfo class.
SvgReader
SVG file reader that extracts path data from SVG files.
SvgWriter
SVG file writer for visualizing clipper paths.
TextInfo
Stores a text label with its rendering attributes. Direct port from C++ SvgWriter::TextInfo class.

Constants§

CLIP_BRUSH_CLR
CLIP_STROKE_CLR
SOLUTION_BRUSH_CLR
SUBJ_BRUSH_CLR
Default colors for SVG visualization (from clipper.svg.utils.h)
SUBJ_STROKE_CLR

Functions§

color_to_html
Convert a u32 ARGB color to an HTML hex string (#RRGGBB). Direct port from C++ ColorToHtml().
get_alpha_as_frac
Extract the alpha channel as a fraction (0.0 to 1.0). Direct port from C++ GetAlphaAsFrac().
svg_add_caption
Add a caption text to the SVG.
svg_add_clip_64
Add clip paths (Paths64) to the SVG.
svg_add_clip_d
Add clip paths (PathsD) to the SVG.
svg_add_open_solution_64
Add open solution paths (Paths64) to the SVG.
svg_add_open_solution_d
Add open solution paths (PathsD) to the SVG.
svg_add_open_subject_64
Add open subject paths (Paths64) to the SVG.
svg_add_open_subject_d
Add open subject paths (PathsD) to the SVG.
svg_add_solution_64
Add solution paths (Paths64) to the SVG.
svg_add_solution_d
Add solution paths (PathsD) to the SVG.
svg_add_subject_64
Add subject paths (Paths64) to the SVG.
svg_add_subject_d
Add subject paths (PathsD) to the SVG.
svg_save_to_file
Save SVG to file with sensible defaults and coordinate styling.