Gin
Loading...
Searching...
No Matches
Functions
images

Functions

juce::Image rasterizeSVG (juce::String svgText, int w, int h)
 Converts SVG text to a rasterized JUCE Image.
 
juce::Path parseSVGPath (const juce::String &txt)
 Parses an SVG path string into a JUCE Path.
 

Detailed Description

Function Documentation

◆ rasterizeSVG()

juce::Image rasterizeSVG ( juce::String  svgText,
int  w,
int  h 
)

Converts SVG text to a rasterized JUCE Image.

This function parses SVG markup and renders it to a bitmap image at the specified dimensions. The SVG will be scaled to fit the given width and height.

Warning
This function may lock the image thread during rendering, which could cause delays if called frequently or on the message thread.
Parameters
svgTextSVG markup as a string
wWidth of the output image in pixels
hHeight of the output image in pixels
Returns
A JUCE Image containing the rendered SVG

◆ parseSVGPath()

juce::Path parseSVGPath ( const juce::String &  txt)

Parses an SVG path string into a JUCE Path.

Similar to juce::Drawable::parseSVGPath(), but with extended support for parsing lists of points. This allows you to create paths from SVG path data strings.

Example SVG path syntax: "M 10,10 L 100,100 L 100,10 Z"

Parameters
txtSVG path data string
Returns
A JUCE Path representing the parsed SVG path