Donner
C++20 SVG rendering library
Loading...
Searching...
No Matches
donner::svg::PathSpline::Command Struct Reference

Metadata for a command, which describes how to connect the points. More...

#include "donner/svg/core/PathSpline.h"

Public Member Functions

 Command (CommandType type, size_t pointIndex, bool isInternalPoint=false)
 Command constructor.
 

Public Attributes

CommandType type
 Type of command.
 
size_t pointIndex
 Index of the first point of this command.
 
bool isInternalPoint = false
 True if the point is derived from an arc and does not represent an original user command. Used to determine if markers should be placed on the point.
 
size_t closePathIndex = size_t(-1)
 If type is CommandType::MoveTo, this is the index of the ClosePath at the end of the path.
 

Friends

bool operator== (const Command &lhs, const Command &rhs)
 Equality operator.
 
std::ostream & operator<< (std::ostream &os, const Command &command)
 Ostream operator for Command, which outputs a human-readable representation.
 

Detailed Description

Metadata for a command, which describes how to connect the points.

Constructor & Destructor Documentation

◆ Command()

donner::svg::PathSpline::Command::Command ( CommandType type,
size_t pointIndex,
bool isInternalPoint = false )
inline

Command constructor.

Parameters
typeType of command.
pointIndexIndex of the first point of this command.
isInternalPointTrue if the point is derived from an arc and does not represent an original user command. Defaults to false.

Friends And Related Symbol Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream & os,
const Command & command )
friend

Ostream operator for Command, which outputs a human-readable representation.

Parameters
osOutput stream.
commandCommand to output.

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