lib

SVGPathParser Class Referenceabstract

#include <svgpathparser.h>

Public Member Functions

void parseSVG (const TQString &d, bool process=false)
 

Protected Member Functions

virtual void svgMoveTo (double x1, double y1, bool abs=true)=0
 
virtual void svgLineTo (double x1, double y1, bool abs=true)=0
 
virtual void svgLineToHorizontal (double x, bool abs=true)
 
virtual void svgLineToVertical (double y, bool abs=true)
 
virtual void svgCurveToCubic (double x1, double y1, double x2, double y2, double x, double y, bool abs=true)=0
 
virtual void svgCurveToCubicSmooth (double x, double y, double x2, double y2, bool abs=true)
 
virtual void svgCurveToQuadratic (double x, double y, double x1, double y1, bool abs=true)
 
virtual void svgCurveToQuadraticSmooth (double x, double y, bool abs=true)
 
virtual void svgArcTo (double x, double y, double r1, double r2, double angle, bool largeArcFlag, bool sweepFlag, bool abs=true)
 
virtual void svgClosePath ()=0
 

Detailed Description

Parser for svg path data, contained in the d attribute.

The parser delivers encountered commands and parameters by calling methods that correspond to those commands. Clients have to derive from this class and implement the abstract command methods.

There are two operating modes. By default the parser just delivers unaltered svg path data commands and parameters. In the second mode, it will convert all relative coordinates to absolute ones, and convert all curves to cubic beziers.

Definition at line 37 of file svgpathparser.h.

Constructor & Destructor Documentation

◆ ~SVGPathParser()

virtual SVGPathParser::~SVGPathParser ( )
inlinevirtual

Definition at line 40 of file svgpathparser.h.

Member Function Documentation

◆ parseSVG()

void SVGPathParser::parseSVG ( const TQString &  d,
bool  process = false 
)

Definition at line 91 of file svgpathparser.cpp.

◆ svgArcTo()

void SVGPathParser::svgArcTo ( double  x,
double  y,
double  r1,
double  r2,
double  angle,
bool  largeArcFlag,
bool  sweepFlag,
bool  abs = true 
)
protectedvirtual

Definition at line 574 of file svgpathparser.cpp.

◆ svgCurveToCubicSmooth()

void SVGPathParser::svgCurveToCubicSmooth ( double  x,
double  y,
double  x2,
double  y2,
bool  abs = true 
)
protectedvirtual

Definition at line 559 of file svgpathparser.cpp.

◆ svgCurveToQuadratic()

void SVGPathParser::svgCurveToQuadratic ( double  x,
double  y,
double  x1,
double  y1,
bool  abs = true 
)
protectedvirtual

Definition at line 564 of file svgpathparser.cpp.

◆ svgCurveToQuadraticSmooth()

void SVGPathParser::svgCurveToQuadraticSmooth ( double  x,
double  y,
bool  abs = true 
)
protectedvirtual

Definition at line 569 of file svgpathparser.cpp.

◆ svgLineToHorizontal()

void SVGPathParser::svgLineToHorizontal ( double  x,
bool  abs = true 
)
protectedvirtual

Definition at line 549 of file svgpathparser.cpp.

◆ svgLineToVertical()

void SVGPathParser::svgLineToVertical ( double  y,
bool  abs = true 
)
protectedvirtual

Definition at line 554 of file svgpathparser.cpp.


The documentation for this class was generated from the following files: