Inkscape
Vector Graphics Editor
Loading...
Searching...
No Matches
path-description.h File Reference

TODO: insert short description here. More...

Go to the source code of this file.

Classes

struct  PathDescr
 A base class for Livarot's path commands. More...
 
struct  PathDescrMoveTo
 A MoveTo path command. More...
 
struct  PathDescrLineTo
 A LineTo path command. More...
 
struct  PathDescrCubicTo
 Cubic Bezier path command. More...
 
struct  PathDescrArcTo
 Elliptical Arc path command. More...
 
struct  PathDescrForced
 A forced point path command. More...
 
struct  PathDescrClose
 Close Path instruction. More...
 

Enumerations

enum  {
  descr_moveto = 0 , descr_lineto = 1 , descr_cubicto = 2 , descr_arcto = 4 ,
  descr_close = 5 , descr_forced = 7 , descr_type_mask = 15
}
 An enum to store the path command type. More...
 

Detailed Description

TODO: insert short description here.

Definition in file path-description.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

An enum to store the path command type.

A number is assigned to each type and the PathDescr class stores a flag variable that stores the number to know which type it is.

Enumerator
descr_moveto 

A MoveTo path command

descr_lineto 

A LineTo path command

descr_cubicto 

A CubicTo path command. Basically a cubic Bezier

descr_arcto 

An elliptical arc

descr_close 

A close path command

descr_forced 

Not exactly sure what a forced point means. As far as I have seen in the simplify code, a forced point is preferred to be kept. The simplification algorithm would make sure the forced point makes its way to the final result. However, as far as I can see, forced point stuff is not used in Inkscape. TODO: Explore how forced points might be being used when Simplify is done after Boolean Ops

descr_type_mask 

As mentioned above, the flag variable of PathDescr stores the type of the command using this enum. The higher bits (after the first four (bit 0 to bit 3) could be used for other flag stuff, so this descr_type_mask can be used to just extract the type. 15 in HEX is 0xF and in BIN is 0000 1111 so ANDing with it will zero any higher bits just leaving you with the type.

Definition at line 25 of file path-description.h.