homog2d library
Public Member Functions | Public Attributes | List of all members
h2d::svg::svgp::SvgPathCommand Struct Reference

Holds the current SVG "path" command, and the number of required numerical values. More...

#include <homog2d.hpp>

Public Member Functions

bool isAbsolute () const
 
bool isNewPolyline () const
 
void setCommand (char c)
 

Public Attributes

PathMode _absRel = PathMode::Absolute
 
char _command = 'M'
 
uint8_t _nbValues = 2
 

Detailed Description

Holds the current SVG "path" command, and the number of required numerical values.

See also
SvgValuesBuffer

Member Function Documentation

◆ isAbsolute()

bool h2d::svg::svgp::SvgPathCommand::isAbsolute ( ) const
inline
12614  {
12615  return _absRel == PathMode::Absolute ? true : false;
12616  }
PathMode _absRel
Definition: homog2d.hpp:12610
Here is the caller graph for this function:

◆ isNewPolyline()

bool h2d::svg::svgp::SvgPathCommand::isNewPolyline ( ) const
inline
12623  {
12624  if( _command == 'm' || _command == 'M' || _command == 'z' || _command == 'Z' )
12625  return true;
12626  return false;
12627  }
char _command
Definition: homog2d.hpp:12611
Here is the caller graph for this function:

◆ setCommand()

void h2d::svg::svgp::SvgPathCommand::setCommand ( char  c)
inline
12618  {
12619  _command = c;
12620  _nbValues = numberValues().at(c);
12621  }
uint8_t _nbValues
Definition: homog2d.hpp:12612
std::map< char, int > & numberValues()
Returns nb of expected values for a given SVG path command. Ref: https://www.w3.org/TR/SVG2/paths.html.
Definition: homog2d.hpp:12588
char _command
Definition: homog2d.hpp:12611
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ _absRel

PathMode h2d::svg::svgp::SvgPathCommand::_absRel = PathMode::Absolute

◆ _command

char h2d::svg::svgp::SvgPathCommand::_command = 'M'

◆ _nbValues

uint8_t h2d::svg::svgp::SvgPathCommand::_nbValues = 2

The documentation for this struct was generated from the following file: