MUSX Document Model
Loading...
Searching...
No Matches
ShapeDesigner.h
1/*
2 * Copyright (C) 2025, Robert Patterson
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a copy
5 * of this software and associated documentation files (the "Software"), to deal
6 * in the Software without restriction, including without limitation the rights
7 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 * copies of the Software, and to permit persons to whom the Software is
9 * furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20 * THE SOFTWARE.
21 */
22#pragma once
23
24#include <variant>
25
26#include "musx/util/Logger.h"
27#include "musx/util/Fraction.h"
28
29#include "BaseClasses.h"
30#include "CommonClasses.h"
31#include "Details.h"
32
33 // do not add other dom class dependencies. Use Implementations.cpp for implementations that need total class access.
34
35namespace musx {
36namespace dom {
37
60
64{
67
72 Bracket,
73
81
85
88 CurveTo,
89
93
97 Ellipse,
98
101 EndGroup,
102
106
109 FillAlt,
110
113 FillSolid,
114
118
121 GoToStart,
122
125 LineWidth,
126
130 Rectangle,
131
134 RLineTo,
135
138 RMoveTo,
139
148
151 SetBlack,
152
155 SetDash,
156
159 SetFont,
160
163 SetGray,
164
167 SetWhite,
168
172 Slur,
173
177
194
197 Stroke,
198
203};
204
208{
212 std::vector<int> data;
213 };
214
219
221 struct CloneChar {
224 int unused2{};
226 char32_t codePoint{};
227 };
228
238
240 struct DrawChar {
241 char32_t codePoint{};
242 };
243
245 struct Ellipse {
248 };
249
256
258 struct LineWidth {
260 };
261
263 struct Rectangle {
266 };
267
269 struct RLineTo {
272 };
273
275 struct RMoveTo {
278 };
279
285 int extra{};
286
288 int startKindCode() const noexcept
289 { return static_cast<int>(static_cast<unsigned int>(packedKindCodes) & 0xFFFFu); }
290
292 int endKindCode() const noexcept
293 { return static_cast<int>((static_cast<unsigned int>(packedKindCodes) >> 16) & 0xFFFFu); }
294 };
295
301
303 struct SetFont {
305 SetFont(const DocumentWeakPtr& document) : font(document)
306 {}
308 };
309
311 struct SetGray {
312 int gray{};
313 };
314
326
344
363
365 enum class VerticalAlign {
366 Center = 1,
367 Left = 2,
368 Right = 3
369 };
370
375
376
378 using InstructionData = std::variant<
379 std::monostate, // for commands with no data
381 Bracket,
382 CloneChar,
383 CurveTo,
384 DrawChar,
385 Ellipse,
387 LineWidth,
388 Rectangle,
389 RLineTo,
390 RMoveTo,
392 SetDash,
393 SetFont,
394 SetGray,
395 Slur,
399 >;
400
403 struct Decoded
404 {
406 InstructionData data{std::monostate{}};
407
409 bool valid() const noexcept { return m_valid; }
410
414 template <typename T>
415 void setPayload(std::optional<T>&& optData)
416 {
417 if (optData) {
418 // Move the contained T into the variant
419 data = std::move(*optData);
420 m_valid = true;
421 } else {
422 // We *tried* to parse data and failed
423 m_valid = false;
424 }
425 }
426
427 private:
428 bool m_valid{true};
429 };
430
432 static std::optional<Undocumented> parseUndocumented(const std::vector<int>& data);
433
435 static std::optional<Bracket> parseBracket(const std::vector<int>& data);
436
438 static std::optional<CloneChar> parseCloneChar(const std::vector<int>& data);
439
441 static std::optional<CurveTo> parseCurveTo(const std::vector<int>& data);
442
444 static std::optional<DrawChar> parseDrawChar(const std::vector<int>& data);
445
447 static std::optional<Ellipse> parseEllipse(const std::vector<int>& data);
448
450 static std::optional<ExternalGraphic> parseExternalGraphic(const std::vector<int>& data);
451
453 static std::optional<LineWidth> parseLineWidth(const std::vector<int>& data);
454
456 static std::optional<Rectangle> parseRectangle(const std::vector<int>& data);
457
459 static std::optional<RLineTo> parseRLineTo(const std::vector<int>& data);
460
462 static std::optional<RMoveTo> parseRMoveTo(const std::vector<int>& data);
463
465 static std::optional<SetArrowhead> parseSetArrowhead(const std::vector<int>& data);
466
468 static std::optional<SetDash> parseSetDash(const std::vector<int>& data);
469
471 static std::optional<SetFont> parseSetFont(const DocumentWeakPtr& document, const std::vector<int>& data);
472
476 static std::vector<int> encodeSetFont(const FontInfo& font);
477
479 static std::optional<SetGray> parseSetGray(const std::vector<int>& data);
480
482 static std::optional<Slur> parseSlur(const std::vector<int>& data);
483
485 static std::optional<StartGroup> parseStartGroup(const std::vector<int>& data);
486
488 static std::optional<StartObject> parseStartObject(const std::vector<int>& data);
489
491 static std::optional<VerticalMode> parseVerticalMode(const std::vector<int>& data);
492};
493
494namespace others {
495
502class ShapeData : public OthersArray<int>
503{
504 std::string_view xmlTag() const override { return XmlNodeName; }
505
506public:
508
509 constexpr static std::string_view XmlNodeName = "shapeData";
510 static const xml::XmlElementArray<ShapeData>& xmlMappingArray();
511};
512
513#ifndef DOXYGEN_SHOULD_IGNORE_THIS
514class ShapeDefTestAccessor; // used by tests to access private iterator in ShapeDef
515#endif
516
517class ShapeInstructionList;
524class ShapeDef : public OthersBase
525{
526private:
528 bool iterateInstructions(std::function<bool(ShapeDefInstructionType, std::vector<int>)> callback) const;
529
530 friend class ShapeDefTestAccessor; // gives tests access, but users don't see it
531
532public:
534 explicit ShapeDef(const DocumentWeakPtr& document, Cmper partId, ShareMode shareMode, Cmper cmper)
535 : OthersBase(document, partId, shareMode, cmper)
536 {
537 }
538
543 enum class ShapeType
544 {
545 Other = 0,
546 Articulation = 1,
547 Barline = 2,
548 Executable = 3,
549 Expression = 4,
550 CustomStem = 5,
551 Frame = 6,
552 Arrowhead = 7,
553 Fretboard = 8,
554 Clef = 9
555 };
556
557 Cmper instructionList{};
558 Cmper dataList{};
559 ShapeType shapeType{};
560
562 bool isBlank() const;
563
567 bool iterateInstructions(std::function<bool(const ShapeDefInstruction::Decoded&)> callback) const;
568
571 KnownShapeDefType recognize() const;
572
579 std::optional<Evpu> calcWidth() const;
580
585 CurveContourDirection calcSlurContour() const;
586
587 constexpr static std::string_view XmlNodeName = "shapeDef";
588 static const xml::XmlElementArray<ShapeDef>& xmlMappingArray();
589};
590
597class ShapeInstructionList : public OthersBase
598{
599public:
601 explicit ShapeInstructionList(const DocumentWeakPtr& document, Cmper partId, ShareMode shareMode, Cmper cmper)
602 : OthersBase(document, partId, shareMode, cmper)
603 {
604 }
605
616
617 std::vector<std::shared_ptr<InstructionInfo>> instructions;
618
619 constexpr static std::string_view XmlNodeName = "shapeList";
620 static const xml::XmlElementArray<ShapeInstructionList>& xmlMappingArray();
621};
622
644[[nodiscard]]
645std::optional<Cmper> importShapeDefInto(const DocumentPtr& target,
646 const MusxInstance<ShapeDef>& source,
647 const ImportObjectCallback& onImported = {});
648
649} // namespace others
650} // namespace dom
651} // namespace musx
ShareMode
Describes how this instance is shared between part and score.
Definition BaseClasses.h:95
Represents the default font settings for a particular element type.
Definition CommonClasses.h:111
OthersArray(const DocumentWeakPtr &document, Cmper partId, ShareMode shareMode, Cmper cmper)
Constructor function.
Definition BaseClasses.h:341
OthersBase(const DocumentWeakPtr &document, Cmper partId, ShareMode shareMode, Cmper cmper, std::optional< Inci > inci=std::nullopt)
Constructs an OthersBase object.
Definition BaseClasses.h:279
BracketStyle
Bracket types.
Definition Details.h:693
An instruction in the shape.
Definition ShapeDesigner.h:608
int numData
the number of data items consumed by this instruction (See ShapeData.)
Definition ShapeDesigner.h:611
static const xml::XmlElementArray< InstructionInfo > & xmlMappingArray()
Required for musx::factory::FieldPopulator.
ShapeDefInstructionType type
the type of instruction
Definition ShapeDesigner.h:612
@ Other
Other/unknown text encoding.
std::optional< Cmper > importShapeDefInto(const DocumentPtr &target, const MusxInstance< ShapeDef > &source, const ImportObjectCallback &onImported)
Copies a shape and everything it owns into another document.
Definition ShapeDesigner.cpp:679
CurveContourDirection
Curve contour direction for ties and slurs.
Definition EnumClasses.h:62
KnownShapeDefType
Enumerates the shape types we can recognize semantically.
Definition ShapeDesigner.h:41
@ PedalArrowheadShortUpDownLongUp
Pedal arrowhead: short up, down, long up.
@ PedalArrowheadDown
Downward wedge used for pedal markings.
@ FingernailPizzCurveUp
Fingernail pizzicato double curve arching upward.
@ SnapPizzicatoAbove
Snap pizzicato mark with vertical stem above the circle.
@ BuzzPizzicato
Buzz pizzicato mark with horizontal stem.
@ FingernailPizzCurveDown
Fingernail pizzicato double curve arching downward.
@ PedalArrowheadUp
Upward wedge used for pedal markings.
@ SnapPizzicatoBelow
Snap pizzicato mark with vertical stem below the circle.
@ Unrecognized
Fallback when recognition fails.
@ SlurTieCurveRight
Horizontal slur or tie shape curving toward the right.
@ PedalArrowheadLongUpDownShortUp
Pedal arrowhead: long up, down, short up.
@ TenutoMark
A horizontal tenuto mark, typically used as an articulation symbol.
@ VerticalLineRightHooks
Vertical line with short horizontal hooks extending to the right at both ends.
@ SlurTieCurveLeft
Horizontal slur or tie shape curving toward the left.
int32_t Efix
EFIX value (64 per EVPU, 64*288=18432 per inch)
Definition Fundamentals.h:62
std::shared_ptr< const T > MusxInstance
Defines the type of a musx instance stored in a pool.
Definition MusxInstance.h:40
int32_t Evpu16ths
1/16 of an EVPU.
Definition Fundamentals.h:61
int32_t Evpu
EVPU value (288 per inch)
Definition Fundamentals.h:59
uint16_t Cmper
Enigma "comperator" key type.
Definition Fundamentals.h:57
@ Blank
Blank clef (invisible, no symbol).
ShapeDefInstructionType
Defines the instruction types for Shape Designer shapes.
Definition ShapeDesigner.h:64
@ Undocumented
catch-all for possible undocumented instruction tags.
std::weak_ptr< Document > DocumentWeakPtr
Shared weak Document pointer.
Definition DocumentElement.h:37
std::function< void(const EnigmaBase &)> ImportObjectCallback
Receives each document-pool object newly created by an import helper.
Definition BaseClasses.h:150
std::shared_ptr< Document > DocumentPtr
Shared Document pointer.
Definition DocumentElement.h:35
std::vector< XmlElementDescriptor< T > > XmlElementArray
an array type for XmlElementDescriptor instances.
Definition XmlInterface.h:133
object model for musx file (enigmaxml)
Definition BaseClasses.h:38
Holds the parsed data for a Bracket instruction.
Definition ShapeDesigner.h:216
details::Bracket::BracketStyle bracketStyle
The style of bracket being created.
Definition ShapeDesigner.h:217
Holds the parsed data for a CloneChar instruction.
Definition ShapeDesigner.h:221
int baselineShift
Baseline shift in EMs (1/1000 of current point size).
Definition ShapeDesigner.h:225
int unused2
Unused/undocumented field at index 2.
Definition ShapeDesigner.h:224
char32_t codePoint
The 32-bit codepoint of the character to clone.
Definition ShapeDesigner.h:226
Evpu dy
The Y coordinate of the endpoint (currently ignored).
Definition ShapeDesigner.h:223
Evpu dx
The X coordinate of the endpoint (relative to current point).
Definition ShapeDesigner.h:222
Holds the parsed data for a CurveTo instruction.
Definition ShapeDesigner.h:230
Evpu c1dx
Relative X offset of the first control point.
Definition ShapeDesigner.h:231
Evpu c2dy
Relative Y offset of the second control point.
Definition ShapeDesigner.h:234
Evpu edy
Relative Y offset of the end point.
Definition ShapeDesigner.h:236
Evpu c2dx
Relative X offset of the second control point.
Definition ShapeDesigner.h:233
Evpu c1dy
Relative Y offset of the first control point.
Definition ShapeDesigner.h:232
Evpu edx
Relative X offset of the end point.
Definition ShapeDesigner.h:235
Contains the parsed instruction type with its data.
Definition ShapeDesigner.h:404
bool valid() const noexcept
Returns true is the data is valid.
Definition ShapeDesigner.h:409
void setPayload(std::optional< T > &&optData)
Sets the payload.
Definition ShapeDesigner.h:415
ShapeDefInstructionType type
Instruction type.
Definition ShapeDesigner.h:405
InstructionData data
Data for instruction.
Definition ShapeDesigner.h:406
Holds the parsed data for a DrawChar instruction.
Definition ShapeDesigner.h:240
char32_t codePoint
The 32-bit codepoint of the character to draw.
Definition ShapeDesigner.h:241
Holds the parsed data for an Ellipse instruction.
Definition ShapeDesigner.h:245
Evpu height
The height of the bounding rectangle.
Definition ShapeDesigner.h:247
Evpu width
The width of the bounding rectangle.
Definition ShapeDesigner.h:246
Holds the parsed data for an ExternalGraphic instruction.
Definition ShapeDesigner.h:251
Evpu height
The height of the placed graphic.
Definition ShapeDesigner.h:253
Cmper cmper
The cmper of the graphic. See others::PageGraphicAssign::graphicCmper for explanation.
Definition ShapeDesigner.h:254
Evpu width
The width of the placed graphic.
Definition ShapeDesigner.h:252
Holds the parsed data for a LineWidth instruction.
Definition ShapeDesigner.h:258
Efix efix
The line width in Efix units.
Definition ShapeDesigner.h:259
Holds the parsed data for an RLineTo instruction.
Definition ShapeDesigner.h:269
Evpu dx
The relative X coordinate delta in Evpu.
Definition ShapeDesigner.h:270
Evpu dy
The relative Y coordinate delta in Evpu.
Definition ShapeDesigner.h:271
Holds the parsed data for an RMoveTo instruction.
Definition ShapeDesigner.h:275
Evpu dx
The relative X coordinate delta in Evpu.
Definition ShapeDesigner.h:276
Evpu dy
The relative Y coordinate delta in Evpu.
Definition ShapeDesigner.h:277
Holds the parsed data for a Rectangle instruction.
Definition ShapeDesigner.h:263
Evpu height
The height of the rectangle.
Definition ShapeDesigner.h:265
Evpu width
The width of the rectangle.
Definition ShapeDesigner.h:264
Holds the parsed data for a SetArrowhead instruction.
Definition ShapeDesigner.h:281
int startArrowId
Raw word 1. Start arrowhead id (preset id or custom arrowhead ShapeDef cmper).
Definition ShapeDesigner.h:283
int extra
Raw word 3. Unknown (value persists when edited by plugin; no observed rendering effect in current ex...
Definition ShapeDesigner.h:285
int endKindCode() const noexcept
Returns the end kind code from packedKindCodes (high 16 bits).
Definition ShapeDesigner.h:292
int endArrowId
Raw word 2. End arrowhead id (preset id or custom arrowhead ShapeDef cmper).
Definition ShapeDesigner.h:284
int startKindCode() const noexcept
Returns the start kind code from packedKindCodes (low 16 bits).
Definition ShapeDesigner.h:288
int packedKindCodes
Raw word 0. Packs start/end kind codes (e.g. 0x00010001 preset/preset, 0x00020002 custom/custom).
Definition ShapeDesigner.h:282
Holds the parsed data for a SetDash instruction.
Definition ShapeDesigner.h:297
Evpu spaceLength
Space between dashes in Evpu.
Definition ShapeDesigner.h:299
Evpu dashLength
Length of each dash segment in Evpu.
Definition ShapeDesigner.h:298
Holds the parsed data for a SetFont instruction.
Definition ShapeDesigner.h:303
SetFont(const DocumentWeakPtr &document)
Constructor function.
Definition ShapeDesigner.h:305
FontInfo font
the parsed font
Definition ShapeDesigner.h:307
Holds the parsed data for a SetGray instruction.
Definition ShapeDesigner.h:311
int gray
Gray value between 0 (black) and 100 (white).
Definition ShapeDesigner.h:312
Holds the parsed data for a Slur instruction.
Definition ShapeDesigner.h:318
Evpu16ths edx
Relative X offset of the end point (1/16 Evpu units).
Definition ShapeDesigner.h:323
Evpu16ths c2dx
Relative X offset of the second control point (1/16 Evpu units).
Definition ShapeDesigner.h:321
Evpu16ths c1dx
Relative X offset of the first control point (1/16 Evpu units).
Definition ShapeDesigner.h:319
Evpu16ths c2dy
Relative Y offset of the second control point (1/16 Evpu units).
Definition ShapeDesigner.h:322
Evpu16ths edy
Relative Y offset of the end point (1/16 Evpu units).
Definition ShapeDesigner.h:324
Evpu16ths c1dy
Relative Y offset of the first control point (1/16 Evpu units).
Definition ShapeDesigner.h:320
Holds the parsed data for a StartGroup instruction.
Definition ShapeDesigner.h:347
Evpu bottom
Bottom of the bounding rectangle.
Definition ShapeDesigner.h:353
Evpu originY
Y coordinate of the origin point.
Definition ShapeDesigner.h:349
int unused10
Undocumented/unused field at index 10.
Definition ShapeDesigner.h:361
int scaleY
Y scale transform (scale ratio * 1000).
Definition ShapeDesigner.h:355
int rotation
Definition ShapeDesigner.h:356
Evpu top
Top of the bounding rectangle.
Definition ShapeDesigner.h:351
Evpu right
Right of the bounding rectangle.
Definition ShapeDesigner.h:352
int unused9
Undocumented/unused field at index 9.
Definition ShapeDesigner.h:360
int scaleX
X scale transform (scale ratio * 1000).
Definition ShapeDesigner.h:354
Evpu left
Left of the bounding rectangle.
Definition ShapeDesigner.h:350
Evpu originX
X coordinate of the origin point.
Definition ShapeDesigner.h:348
Holds the parsed data for a StartObject instruction.
Definition ShapeDesigner.h:328
Evpu left
Left of the bounding rectangle.
Definition ShapeDesigner.h:331
Evpu originY
Y coordinate of the origin point.
Definition ShapeDesigner.h:330
Evpu bottom
Bottom of the bounding rectangle.
Definition ShapeDesigner.h:334
int scaleY
Y scale transform (scale ratio * 1000).
Definition ShapeDesigner.h:336
int unused10
Undocumented/unused field at index 10.
Definition ShapeDesigner.h:342
int scaleX
X scale transform (scale ratio * 1000).
Definition ShapeDesigner.h:335
Evpu top
Top of the bounding rectangle.
Definition ShapeDesigner.h:332
int unused9
Undocumented/unused field at index 9.
Definition ShapeDesigner.h:341
Evpu originX
X coordinate of the origin point.
Definition ShapeDesigner.h:329
int rotation
Definition ShapeDesigner.h:337
Evpu right
Right of the bounding rectangle.
Definition ShapeDesigner.h:333
Holds the parsed data for an Undocumented instruction.
Definition ShapeDesigner.h:211
std::vector< int > data
Raw data items for the undocumented instruction.
Definition ShapeDesigner.h:212
Holds the parsed data for a VerticalMode instruction.
Definition ShapeDesigner.h:372
VerticalAlign mode
The pen vertical alignment mode.
Definition ShapeDesigner.h:373
Helper functions and structs for decoding instruction data vectors in others::ShapeDef.
Definition ShapeDesigner.h:208
static std::optional< SetFont > parseSetFont(const DocumentWeakPtr &document, const std::vector< int > &data)
Attempts to parse a SetFont instruction.
Definition ShapeDesigner.cpp:210
static std::optional< ExternalGraphic > parseExternalGraphic(const std::vector< int > &data)
Attempts to parse an ExternalGraphic instruction.
Definition ShapeDesigner.cpp:129
static std::optional< Slur > parseSlur(const std::vector< int > &data)
Attempts to parse a Slur instruction.
Definition ShapeDesigner.cpp:245
static std::optional< LineWidth > parseLineWidth(const std::vector< int > &data)
Attempts to parse a LineWidth instruction.
Definition ShapeDesigner.cpp:142
static std::optional< VerticalMode > parseVerticalMode(const std::vector< int > &data)
Attempts to parse a VerticalMode instruction.
Definition ShapeDesigner.cpp:300
static std::optional< SetGray > parseSetGray(const std::vector< int > &data)
Attempts to parse a SetGray instruction.
Definition ShapeDesigner.cpp:234
static std::optional< DrawChar > parseDrawChar(const std::vector< int > &data)
Attempts to parse a DrawChar instruction.
Definition ShapeDesigner.cpp:108
static std::optional< StartObject > parseStartObject(const std::vector< int > &data)
Attempts to parse a StartObject instruction.
Definition ShapeDesigner.cpp:279
VerticalAlign
Pen vertical alignment modes for the VerticalMode instruction.
Definition ShapeDesigner.h:365
@ Center
Draw line centered on the coordinates.
@ Right
Draw line on the "right" side of the coordinates.
@ Left
Draw line on the "left" side of the coordinates.
static std::optional< SetArrowhead > parseSetArrowhead(const std::vector< int > &data)
Attempts to parse a SetArrowhead instruction.
Definition ShapeDesigner.cpp:184
static std::optional< StartGroup > parseStartGroup(const std::vector< int > &data)
Attempts to parse a StartGroup instruction.
Definition ShapeDesigner.cpp:258
static std::optional< Rectangle > parseRectangle(const std::vector< int > &data)
Attempts to parse a Rectangle instruction.
Definition ShapeDesigner.cpp:151
static std::optional< RLineTo > parseRLineTo(const std::vector< int > &data)
Attempts to parse an RLineTo instruction.
Definition ShapeDesigner.cpp:163
static std::optional< RMoveTo > parseRMoveTo(const std::vector< int > &data)
Attempts to parse an RMoveTo instruction.
Definition ShapeDesigner.cpp:172
static std::vector< int > encodeSetFont(const FontInfo &font)
Builds the instruction data for a SetFont instruction.
Definition ShapeDesigner.cpp:222
static std::optional< Ellipse > parseEllipse(const std::vector< int > &data)
Attempts to parse an Ellipse instruction.
Definition ShapeDesigner.cpp:117
static std::optional< SetDash > parseSetDash(const std::vector< int > &data)
Attempts to parse a SetDash instruction.
Definition ShapeDesigner.cpp:198
std::variant< std::monostate, Undocumented, Bracket, CloneChar, CurveTo, DrawChar, Ellipse, ExternalGraphic, LineWidth, Rectangle, RLineTo, RMoveTo, SetArrowhead, SetDash, SetFont, SetGray, Slur, StartGroup, StartObject, VerticalMode > InstructionData
A variant for passing specific data per instruction type.
Definition ShapeDesigner.h:399
static std::optional< CloneChar > parseCloneChar(const std::vector< int > &data)
Attempts to parse a CloneChar instruction.
Definition ShapeDesigner.cpp:80
static std::optional< CurveTo > parseCurveTo(const std::vector< int > &data)
Attempts to parse a CurveTo instruction.
Definition ShapeDesigner.cpp:95
static std::optional< Undocumented > parseUndocumented(const std::vector< int > &data)
Attempts to parse an Undocumented instruction (raw passthrough).
Definition ShapeDesigner.cpp:46
static std::optional< Bracket > parseBracket(const std::vector< int > &data)
Attempts to parse a Bracket instruction.
Definition ShapeDesigner.cpp:53