MUSX Document Model
Loading...
Searching...
No Matches
musx::dom::ShapeDefInstruction Struct Reference

Helper functions and structs for decoding instruction data vectors in others::ShapeDef. More...

#include <ShapeDesigner.h>

Classes

struct  Bracket
 Holds the parsed data for a Bracket instruction. More...
 
struct  CloneChar
 Holds the parsed data for a CloneChar instruction. More...
 
struct  CurveTo
 Holds the parsed data for a CurveTo instruction. More...
 
struct  Decoded
 Contains the parsed instruction type with its data. More...
 
struct  DrawChar
 Holds the parsed data for a DrawChar instruction. More...
 
struct  Ellipse
 Holds the parsed data for an Ellipse instruction. More...
 
struct  ExternalGraphic
 Holds the parsed data for an ExternalGraphic instruction. More...
 
struct  LineWidth
 Holds the parsed data for a LineWidth instruction. More...
 
struct  Rectangle
 Holds the parsed data for a Rectangle instruction. More...
 
struct  RLineTo
 Holds the parsed data for an RLineTo instruction. More...
 
struct  RMoveTo
 Holds the parsed data for an RMoveTo instruction. More...
 
struct  SetArrowhead
 Holds the parsed data for a SetArrowhead instruction. More...
 
struct  SetDash
 Holds the parsed data for a SetDash instruction. More...
 
struct  SetFont
 Holds the parsed data for a SetFont instruction. More...
 
struct  SetGray
 Holds the parsed data for a SetGray instruction. More...
 
struct  Slur
 Holds the parsed data for a Slur instruction. More...
 
struct  StartGroup
 Holds the parsed data for a StartGroup instruction. More...
 
struct  StartObject
 Holds the parsed data for a StartObject instruction. More...
 
struct  Undocumented
 Holds the parsed data for an Undocumented instruction. More...
 
struct  VerticalMode
 Holds the parsed data for a VerticalMode instruction. More...
 

Public Types

enum class  VerticalAlign { Center = 1 , Left = 2 , Right = 3 }
 Pen vertical alignment modes for the VerticalMode instruction. More...
 
using InstructionData = std::variant< std::monostate, Undocumented, Bracket, CloneChar, CurveTo, DrawChar, Ellipse, ExternalGraphic, LineWidth, Rectangle, RLineTo, RMoveTo, SetArrowhead, SetDash, SetFont, SetGray, Slur, StartGroup, StartObject, VerticalMode >
 A variant for passing specific data per instruction type.
 

Static Public Member Functions

static std::optional< UndocumentedparseUndocumented (const std::vector< int > &data)
 Attempts to parse an Undocumented instruction (raw passthrough).
 
static std::optional< BracketparseBracket (const std::vector< int > &data)
 Attempts to parse a Bracket instruction.
 
static std::optional< CloneCharparseCloneChar (const std::vector< int > &data)
 Attempts to parse a CloneChar instruction.
 
static std::optional< CurveToparseCurveTo (const std::vector< int > &data)
 Attempts to parse a CurveTo instruction.
 
static std::optional< DrawCharparseDrawChar (const std::vector< int > &data)
 Attempts to parse a DrawChar instruction.
 
static std::optional< EllipseparseEllipse (const std::vector< int > &data)
 Attempts to parse an Ellipse instruction.
 
static std::optional< ExternalGraphicparseExternalGraphic (const std::vector< int > &data)
 Attempts to parse an ExternalGraphic instruction.
 
static std::optional< LineWidthparseLineWidth (const std::vector< int > &data)
 Attempts to parse a LineWidth instruction.
 
static std::optional< RectangleparseRectangle (const std::vector< int > &data)
 Attempts to parse a Rectangle instruction.
 
static std::optional< RLineToparseRLineTo (const std::vector< int > &data)
 Attempts to parse an RLineTo instruction.
 
static std::optional< RMoveToparseRMoveTo (const std::vector< int > &data)
 Attempts to parse an RMoveTo instruction.
 
static std::optional< SetArrowheadparseSetArrowhead (const std::vector< int > &data)
 Attempts to parse a SetArrowhead instruction.
 
static std::optional< SetDashparseSetDash (const std::vector< int > &data)
 Attempts to parse a SetDash instruction.
 
static std::optional< SetFontparseSetFont (const DocumentWeakPtr &document, const std::vector< int > &data)
 Attempts to parse a SetFont instruction.
 
static std::optional< SetGrayparseSetGray (const std::vector< int > &data)
 Attempts to parse a SetGray instruction.
 
static std::optional< SlurparseSlur (const std::vector< int > &data)
 Attempts to parse a Slur instruction.
 
static std::optional< StartGroupparseStartGroup (const std::vector< int > &data)
 Attempts to parse a StartGroup instruction.
 
static std::optional< StartObjectparseStartObject (const std::vector< int > &data)
 Attempts to parse a StartObject instruction.
 
static std::optional< VerticalModeparseVerticalMode (const std::vector< int > &data)
 Attempts to parse a VerticalMode instruction.
 

Detailed Description

Helper functions and structs for decoding instruction data vectors in others::ShapeDef.

Member Enumeration Documentation

◆ VerticalAlign

Pen vertical alignment modes for the VerticalMode instruction.

Enumerator
Center 

Draw line centered on the coordinates.

Left 

Draw line on the "left" side of the coordinates.

Right 

Draw line on the "right" side of the coordinates.