├── .gitignore
├── Writers
├── DelimiterElementWriter.cs
├── EscapeWriter.cs
├── ApplicationStructureDescriptorWriter.cs
└── ExternalWriter.cs
├── CgmInfoGui
├── Assets
│ └── avalonia-logo.ico
├── ViewModels
│ ├── ViewModelBase.cs
│ ├── Nodes
│ │ ├── SimpleNode.cs
│ │ ├── UnsupportedContainer.cs
│ │ ├── FontListNode.cs
│ │ ├── Sources
│ │ │ ├── ITileSource.cs
│ │ │ ├── TileSource.cs
│ │ │ └── BitonalTileSource.cs
│ │ ├── PictureNode.cs
│ │ ├── MetafileNode.cs
│ │ ├── SegmentNode.cs
│ │ ├── InvalidCommandNode.cs
│ │ ├── UnsupportedNode.cs
│ │ ├── NodeBase.cs
│ │ ├── APSAttributeNode.cs
│ │ ├── MetafileDescriptionNode.cs
│ │ └── HotspotNode.cs
│ ├── CompanionFileViewModel.cs
│ ├── HotspotsViewModel.cs
│ ├── ApplicationStructureViewModel.cs
│ └── DockFactory.cs
├── Views
│ ├── MainWindow.axaml.cs
│ ├── HotspotsView.axaml.cs
│ ├── CompanionFileView.axaml.cs
│ ├── MetafileStructureView.axaml.cs
│ ├── ApplicationStructureView.axaml.cs
│ ├── ApplicationStructureView.axaml
│ ├── HotspotsView.axaml
│ └── CompanionFileView.axaml
├── Globals.axaml
├── Controls
│ ├── PropertyGrid
│ │ ├── ReadOnlyPropertyGrid.axaml.cs
│ │ └── ReadOnlyPropertyGrid.axaml
│ ├── PropertiesPanel.axaml.cs
│ ├── RawPanel.axaml.cs
│ └── OffsetColumn.cs
├── Program.cs
├── ViewLocator.cs
├── Converters
│ ├── HexConverter.cs
│ ├── FileSizeConverter.cs
│ └── StringJoinConverter.cs
├── app.manifest
├── Traversal
│ ├── XCFDocumentBuilderVisitor.cs
│ ├── APSStructureBuilderVisitor.cs
│ └── MetafileContext.cs
├── App.axaml
├── App.axaml.cs
└── Services
│ └── IFileService.cs
├── BinaryEncoding
├── DelimiterElementReader.cs
├── ApplicationStructureDescriptorReader.cs
├── CommandHeader.cs
├── ExternalReader.cs
└── EscapeReader.cs
├── Commands
├── Enums
│ ├── RealRepresentation.cs
│ ├── CellRepresentationMode.cs
│ ├── ColorSpace.cs
│ ├── RegionIndicator.cs
│ ├── OnOffIndicator.cs
│ ├── ArcClosureType.cs
│ ├── FinalFlag.cs
│ ├── ColorModeType.cs
│ ├── ColorModel.cs
│ ├── Highlighting.cs
│ ├── ActionRequired.cs
│ ├── ScalingModeType.cs
│ ├── VdcTypeSpecification.cs
│ ├── InheritanceFlag.cs
│ ├── AspectSourceFlagsValue.cs
│ ├── ClipInheritanceType.cs
│ ├── HatchStyleIndicator.cs
│ ├── InheritanceFilterSetting.cs
│ ├── SegmentTransformationApplication.cs
│ ├── LineProgressionDirection.cs
│ ├── RealPrecisionSpecification.cs
│ ├── TextPathMode.cs
│ ├── ClippingMode.cs
│ ├── TextPrecisionType.cs
│ ├── TextPathType.cs
│ ├── CellPathDirection.cs
│ ├── EdgeOutFlags.cs
│ ├── WidthSpecificationModeType.cs
│ ├── DeviceViewportSpecificationModeType.cs
│ ├── CharacterCodingAnnouncerType.cs
│ ├── HorizontalTextAlignment.cs
│ ├── CharacterSetType.cs
│ ├── VerticalTextAlignment.cs
│ ├── InteriorStyleType.cs
│ ├── DataTypeIndex.cs
│ └── AspectSourceFlagsType.cs
├── StructuredDataElement.cs
├── Delimiter
│ ├── EndFigure.cs
│ ├── EndMetafile.cs
│ ├── EndPicture.cs
│ ├── EndSegment.cs
│ ├── BeginFigure.cs
│ ├── EndTileArray.cs
│ ├── BeginPictureBody.cs
│ ├── EndCompoundLine.cs
│ ├── BeginCompoundLine.cs
│ ├── EndProtectionRegion.cs
│ ├── EndCompoundTextPath.cs
│ ├── EndApplicationStructure.cs
│ ├── BeginCompoundTextPath.cs
│ ├── BeginApplicationStructureBody.cs
│ ├── BeginMetafile.cs
│ ├── BeginPicture.cs
│ ├── BeginSegment.cs
│ ├── BeginProtectionRegion.cs
│ └── BeginApplicationStructure.cs
├── Control
│ ├── NewRegion.cs
│ ├── MiterLimit.cs
│ ├── VdcIntegerPrecision.cs
│ ├── AuxiliaryColor.cs
│ ├── SavePrimitiveContext.cs
│ ├── ClipIndicator.cs
│ ├── EdgeClippingMode.cs
│ ├── LineClippingMode.cs
│ ├── RestorePrimitiveContext.cs
│ ├── Transparency.cs
│ ├── MarkerClippingMode.cs
│ ├── GeneralizedTextPathMode.cs
│ ├── ClipRectangle.cs
│ ├── ProtectionRegionIndicator.cs
│ └── VdcRealPrecision.cs
├── GraphicalPrimitives
│ ├── ConnectingEdge.cs
│ ├── Polygon.cs
│ ├── Polyline.cs
│ ├── Polymarker.cs
│ ├── DisjointPolyline.cs
│ ├── AppendText.cs
│ ├── Circle.cs
│ ├── Rectangle.cs
│ ├── PolygonSet.cs
│ ├── TextCommand.cs
│ ├── CircularArc3Point.cs
│ ├── ParabolicArc.cs
│ ├── CircularArcCenter.cs
│ ├── Ellipse.cs
│ ├── CircularArcCenterReversed.cs
│ ├── CircularArc3PointClose.cs
│ ├── NonUniformBSpline.cs
│ ├── RestrictedText.cs
│ ├── CircularArcCenterClose.cs
│ ├── CellArray.cs
│ ├── EllipticalArc.cs
│ ├── HyperbolicArc.cs
│ ├── NonUniformRationalBSpline.cs
│ ├── MetafileCompressionTypes.cs
│ ├── Tile.cs
│ ├── EllipticalArcClose.cs
│ ├── BitonalTile.cs
│ └── Polybezier.cs
├── Segment
│ ├── InheritanceFilterItem.cs
│ ├── InheritanceFilter.cs
│ ├── ClipInheritance.cs
│ ├── SegmentPickPriority.cs
│ ├── SegmentDisplayPriority.cs
│ ├── SegmentTransformation.cs
│ ├── SegmentHighlighting.cs
│ └── CopySegment.cs
├── Attributes
│ ├── EdgeWidth.cs
│ ├── LineWidth.cs
│ ├── MarkerSize.cs
│ ├── PatternIndex.cs
│ ├── TextFontIndex.cs
│ ├── EdgeBundleIndex.cs
│ ├── FillBundleIndex.cs
│ ├── LineBundleIndex.cs
│ ├── TextBundleIndex.cs
│ ├── CharacterHeight.cs
│ ├── CharacterSetIndex.cs
│ ├── MarkerBundleIndex.cs
│ ├── PickIdentifier.cs
│ ├── TextPath.cs
│ ├── EdgeColor.cs
│ ├── FillColor.cs
│ ├── LineColor.cs
│ ├── TextColor.cs
│ ├── MarkerColor.cs
│ ├── CharacterExpansionFactor.cs
│ ├── EdgeTypeInitialOffset.cs
│ ├── LineTypeInitialOffset.cs
│ ├── AlternateCharacterSetIndex.cs
│ ├── InteriorStyle.cs
│ ├── EdgeVisibility.cs
│ ├── TextPrecision.cs
│ ├── FillReferencePoint.cs
│ ├── CharacterSpacing.cs
│ ├── ColorTable.cs
│ ├── PatternSize.cs
│ ├── CharacterOrientation.cs
│ ├── AspectSourceFlags.cs
│ ├── PatternTable.cs
│ ├── TextAlignment.cs
│ ├── EdgeJoin.cs
│ ├── LineJoin.cs
│ ├── EdgeTypeContinuation.cs
│ ├── LineTypeContinuation.cs
│ ├── RestrictedTextType.cs
│ ├── EdgeType.cs
│ └── InterpolatedInterior.cs
├── MetafileDescriptor
│ ├── MetafileVersion.cs
│ ├── NamePrecision.cs
│ ├── ColorPrecision.cs
│ ├── IndexPrecision.cs
│ ├── MaximumColorIndex.cs
│ ├── IntegerPrecision.cs
│ ├── ColorIndexPrecision.cs
│ ├── FontList.cs
│ ├── MetafileDescription.cs
│ ├── VdcType.cs
│ ├── ColorModelCommand.cs
│ ├── MetafileDefaultsReplacement.cs
│ ├── MaximumVdcExtent.cs
│ ├── SegmentPriorityExtent.cs
│ ├── CharacterCodingAnnouncer.cs
│ └── CharacterSetList.cs
├── PictureDescriptor
│ ├── BackgroundColor.cs
│ ├── ColorSelectionMode.cs
│ ├── VdcExtent.cs
│ ├── DeviceViewport.cs
│ ├── EdgeWidthSpecificationMode.cs
│ ├── LineWidthSpecificationMode.cs
│ ├── MarkerSizeSpecificationMode.cs
│ ├── InteriorStyleSpecificationMode.cs
│ ├── ScalingMode.cs
│ ├── LineAndEdgeTypeDefinition.cs
│ ├── DeviceViewportSpecificationMode.cs
│ ├── GeometricPatternDefinition.cs
│ └── HatchStyleDefinition.cs
├── External
│ ├── ApplicationData.cs
│ └── Message.cs
├── StructuredDataRecord.cs
├── ApplicationStructureDescriptor
│ └── ApplicationStructureAttribute.cs
├── Command.cs
└── TextTokenAttribute.cs
├── Utilities
├── ARGB.cs
├── MetafilePoint.cs
├── MetafileColorRGB.cs
├── MetafileColor.cs
├── MetafileMatrix.cs
├── MetafileColorIndexed.cs
├── MetafileColorCIE.cs
├── TrackingBuffer.cs
└── MetafileColorCMYK.cs
├── Common.props
├── StreamExtensions.cs
├── TextEncoding
├── ApplicationStructureDescriptorReader.cs
├── ExternalReader.cs
└── EscapeReader.cs
├── MetafileProperties.cs
├── EncodingExtensions.cs
├── .github
├── workflows
│ └── dotnet.yml
└── dependabot.yml
├── CgmInfoCmd
└── CgmInfoCmd.csproj
├── Traversal
└── MetafilePropertyVisitor.cs
└── CgmInfo.csproj
/.gitignore:
--------------------------------------------------------------------------------
1 | *.user
2 | *.suo
3 | *.bak
4 | /packages
5 | bin/
6 | obj/
7 | /.vs/
8 | /.cr/
9 |
--------------------------------------------------------------------------------
/Writers/DelimiterElementWriter.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BhaaLseN/CgmInfo/HEAD/Writers/DelimiterElementWriter.cs
--------------------------------------------------------------------------------
/CgmInfoGui/Assets/avalonia-logo.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BhaaLseN/CgmInfo/HEAD/CgmInfoGui/Assets/avalonia-logo.ico
--------------------------------------------------------------------------------
/BinaryEncoding/DelimiterElementReader.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BhaaLseN/CgmInfo/HEAD/BinaryEncoding/DelimiterElementReader.cs
--------------------------------------------------------------------------------
/CgmInfoGui/ViewModels/ViewModelBase.cs:
--------------------------------------------------------------------------------
1 | using CommunityToolkit.Mvvm.ComponentModel;
2 |
3 | namespace CgmInfoGui.ViewModels;
4 |
5 | public class ViewModelBase : ObservableObject
6 | {
7 | }
8 |
--------------------------------------------------------------------------------
/Commands/Enums/RealRepresentation.cs:
--------------------------------------------------------------------------------
1 | namespace CgmInfo.Commands.Enums
2 | {
3 | public enum RealRepresentation
4 | {
5 | FloatingPoint = 0,
6 | FixedPoint = 1,
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/Commands/Enums/CellRepresentationMode.cs:
--------------------------------------------------------------------------------
1 | namespace CgmInfo.Commands.Enums
2 | {
3 | public enum CellRepresentationMode
4 | {
5 | RunLengthList = 0,
6 | PackedList = 1,
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/Commands/Enums/ColorSpace.cs:
--------------------------------------------------------------------------------
1 | namespace CgmInfo.Commands.Enums
2 | {
3 | public enum ColorSpace
4 | {
5 | Unknown = 0,
6 | RGB,
7 | CMYK,
8 | CIE,
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/Commands/Enums/RegionIndicator.cs:
--------------------------------------------------------------------------------
1 | namespace CgmInfo.Commands.Enums
2 | {
3 | public enum RegionIndicator
4 | {
5 | Off = 1,
6 | Clip = 2,
7 | Shield = 3,
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/Commands/Enums/OnOffIndicator.cs:
--------------------------------------------------------------------------------
1 | namespace CgmInfo.Commands.Enums
2 | {
3 | public enum OnOffIndicator
4 | {
5 | [TextToken("OFF")]
6 | Off = 0,
7 | [TextToken("ON")]
8 | On = 1,
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/Commands/Enums/ArcClosureType.cs:
--------------------------------------------------------------------------------
1 | namespace CgmInfo.Commands.Enums
2 | {
3 | public enum ArcClosureType
4 | {
5 | [TextToken("PIE")]
6 | Pie = 0,
7 | [TextToken("CHORD")]
8 | Chord = 1,
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/Commands/Enums/FinalFlag.cs:
--------------------------------------------------------------------------------
1 | namespace CgmInfo.Commands.Enums
2 | {
3 | public enum FinalFlag
4 | {
5 | [TextToken("NOTFINAL")]
6 | NotFinal = 0,
7 | [TextToken("FINAL")]
8 | Final = 1,
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/CgmInfoGui/Views/MainWindow.axaml.cs:
--------------------------------------------------------------------------------
1 | using Avalonia.Controls;
2 |
3 | namespace CgmInfoGui.Views;
4 |
5 | public partial class MainWindow : Window
6 | {
7 | public MainWindow()
8 | {
9 | InitializeComponent();
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/Commands/Enums/ColorModeType.cs:
--------------------------------------------------------------------------------
1 | namespace CgmInfo.Commands.Enums
2 | {
3 | public enum ColorModeType
4 | {
5 | [TextToken("INDEXED")]
6 | Indexed = 0,
7 | [TextToken("DIRECT")]
8 | Direct = 1,
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/Commands/Enums/ColorModel.cs:
--------------------------------------------------------------------------------
1 | namespace CgmInfo.Commands.Enums
2 | {
3 | public enum ColorModel
4 | {
5 | RGB = 1,
6 | CIELAB = 2,
7 | CIELUV = 3,
8 | CMYK = 4,
9 | RGBrelated = 5,
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/Commands/Enums/Highlighting.cs:
--------------------------------------------------------------------------------
1 | namespace CgmInfo.Commands.Enums
2 | {
3 | public enum Highlighting
4 | {
5 | [TextToken("NORMAL")]
6 | Normal = 0,
7 | [TextToken("HIGHL")]
8 | Highlighted = 1,
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/CgmInfoGui/ViewModels/Nodes/SimpleNode.cs:
--------------------------------------------------------------------------------
1 | namespace CgmInfoGui.ViewModels.Nodes;
2 |
3 | public class SimpleNode(string? name) : NodeBase
4 | {
5 | public string Name { get; } = name ?? string.Empty;
6 | public override string DisplayName => Name;
7 | }
8 |
--------------------------------------------------------------------------------
/Commands/Enums/ActionRequired.cs:
--------------------------------------------------------------------------------
1 | namespace CgmInfo.Commands.Enums
2 | {
3 | public enum ActionRequired
4 | {
5 | [TextToken("NOACTION")]
6 | NoAction = 0,
7 | [TextToken("ACTION")]
8 | Action = 1,
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/CgmInfoGui/Views/HotspotsView.axaml.cs:
--------------------------------------------------------------------------------
1 | using Avalonia.Controls;
2 |
3 | namespace CgmInfoGui.Views;
4 |
5 | public partial class HotspotsView : UserControl
6 | {
7 | public HotspotsView()
8 | {
9 | InitializeComponent();
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/Commands/Enums/ScalingModeType.cs:
--------------------------------------------------------------------------------
1 | namespace CgmInfo.Commands.Enums
2 | {
3 | public enum ScalingModeType
4 | {
5 | [TextToken("ABSTRACT")]
6 | Abstract = 0,
7 | [TextToken("METRIC")]
8 | Metric = 1,
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/Commands/Enums/VdcTypeSpecification.cs:
--------------------------------------------------------------------------------
1 | namespace CgmInfo.Commands.Enums
2 | {
3 | public enum VdcTypeSpecification
4 | {
5 | [TextToken("INTEGER")]
6 | Integer = 0,
7 | [TextToken("REAL")]
8 | Real = 1,
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/Commands/Enums/InheritanceFlag.cs:
--------------------------------------------------------------------------------
1 | namespace CgmInfo.Commands.Enums
2 | {
3 | public enum InheritanceFlag
4 | {
5 | [TextToken("STLIST")]
6 | StateList = 0,
7 | [TextToken("APS")]
8 | ApplicationStructure = 1,
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/CgmInfoGui/Views/CompanionFileView.axaml.cs:
--------------------------------------------------------------------------------
1 | using Avalonia.Controls;
2 |
3 | namespace CgmInfoGui.Views;
4 |
5 | public partial class CompanionFileView : UserControl
6 | {
7 | public CompanionFileView()
8 | {
9 | InitializeComponent();
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/Commands/Enums/AspectSourceFlagsValue.cs:
--------------------------------------------------------------------------------
1 | namespace CgmInfo.Commands.Enums
2 | {
3 | public enum AspectSourceFlagsValue
4 | {
5 | [TextToken("INDIV")]
6 | Individual = 0,
7 | [TextToken("BUNDLED")]
8 | Bundled = 1,
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/Commands/Enums/ClipInheritanceType.cs:
--------------------------------------------------------------------------------
1 | namespace CgmInfo.Commands.Enums
2 | {
3 | public enum ClipInheritanceType
4 | {
5 | [TextToken("STLIST")]
6 | StateList = 0,
7 | [TextToken("INTERSECTION")]
8 | Intersection = 1,
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/Commands/Enums/HatchStyleIndicator.cs:
--------------------------------------------------------------------------------
1 | namespace CgmInfo.Commands.Enums
2 | {
3 | public enum HatchStyleIndicator
4 | {
5 | [TextToken("PARALLEL")]
6 | Parallel = 0,
7 | [TextToken("CROSSHATCH")]
8 | CrossHatch = 1,
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/Commands/Enums/InheritanceFilterSetting.cs:
--------------------------------------------------------------------------------
1 | namespace CgmInfo.Commands.Enums
2 | {
3 | public enum InheritanceFilterSetting
4 | {
5 | [TextToken("STLIST")]
6 | StateList = 0,
7 | [TextToken("SEG")]
8 | Segment = 1,
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/Commands/Enums/SegmentTransformationApplication.cs:
--------------------------------------------------------------------------------
1 | namespace CgmInfo.Commands.Enums
2 | {
3 | public enum SegmentTransformationApplication
4 | {
5 | [TextToken("NO")]
6 | No = 0,
7 | [TextToken("YES")]
8 | Yes = 1,
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/CgmInfoGui/Views/MetafileStructureView.axaml.cs:
--------------------------------------------------------------------------------
1 | using Avalonia.Controls;
2 |
3 | namespace CgmInfoGui.Views;
4 |
5 | public partial class MetafileStructureView : UserControl
6 | {
7 | public MetafileStructureView()
8 | {
9 | InitializeComponent();
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/CgmInfoGui/Globals.axaml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
--------------------------------------------------------------------------------
/Commands/Enums/LineProgressionDirection.cs:
--------------------------------------------------------------------------------
1 | namespace CgmInfo.Commands.Enums
2 | {
3 | public enum LineProgressionDirection
4 | {
5 | [TextToken("90")]
6 | Clockwise_90deg = 0,
7 | [TextToken("270")]
8 | CounterClockwise_270deg = 1,
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/CgmInfoGui/Views/ApplicationStructureView.axaml.cs:
--------------------------------------------------------------------------------
1 | using Avalonia.Controls;
2 |
3 | namespace CgmInfoGui.Views;
4 |
5 | public partial class ApplicationStructureView : UserControl
6 | {
7 | public ApplicationStructureView()
8 | {
9 | InitializeComponent();
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/CgmInfoGui/ViewModels/Nodes/UnsupportedContainer.cs:
--------------------------------------------------------------------------------
1 | namespace CgmInfoGui.ViewModels.Nodes;
2 |
3 | public class UnsupportedContainer : NodeBase
4 | {
5 | public override string DisplayName
6 | {
7 | get { return string.Format("Unsupported Nodes [{0} entries]", Nodes.Count); }
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/Commands/Enums/RealPrecisionSpecification.cs:
--------------------------------------------------------------------------------
1 | namespace CgmInfo.Commands.Enums
2 | {
3 | public enum RealPrecisionSpecification
4 | {
5 | Unsupported = 0,
6 | FloatingPoint32Bit,
7 | FloatingPoint64Bit,
8 | FixedPoint32Bit,
9 | FixedPoint64Bit,
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/Commands/Enums/TextPathMode.cs:
--------------------------------------------------------------------------------
1 | namespace CgmInfo.Commands.Enums
2 | {
3 | public enum TextPathMode
4 | {
5 | [TextToken("OFF")]
6 | Off = 0,
7 | [TextToken("NONAXIS")]
8 | NonTangential = 1,
9 | [TextToken("AXIS")]
10 | AxisTangential = 2,
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/Commands/Enums/ClippingMode.cs:
--------------------------------------------------------------------------------
1 | namespace CgmInfo.Commands.Enums
2 | {
3 | public enum ClippingMode
4 | {
5 | [TextToken("LOCUS")]
6 | Locus = 0,
7 | [TextToken("SHAPE")]
8 | Shape = 1,
9 | [TextToken("LOCUSTHENSHAPE")]
10 | LocusThenShape = 2,
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/Commands/Enums/TextPrecisionType.cs:
--------------------------------------------------------------------------------
1 | namespace CgmInfo.Commands.Enums
2 | {
3 | public enum TextPrecisionType
4 | {
5 | [TextToken("STRING")]
6 | String = 0,
7 | [TextToken("CHAR")]
8 | Character = 1,
9 | [TextToken("STROKE")]
10 | Stroke = 2,
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/Commands/Enums/TextPathType.cs:
--------------------------------------------------------------------------------
1 | namespace CgmInfo.Commands.Enums
2 | {
3 | public enum TextPathType
4 | {
5 | [TextToken("RIGHT")]
6 | Right = 0,
7 | [TextToken("LEFT")]
8 | Left = 1,
9 | [TextToken("UP")]
10 | Up = 2,
11 | [TextToken("DOWN")]
12 | Down = 3,
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/Utilities/ARGB.cs:
--------------------------------------------------------------------------------
1 | namespace CgmInfo.Utilities
2 | {
3 | public struct ARGB
4 | {
5 | public int Alpha { get; set; }
6 | public int Red { get; set; }
7 | public int Green { get; set; }
8 | public int Blue { get; set; }
9 |
10 | public override string ToString() => $"A={Alpha} R={Red} G={Green} B={Blue}";
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/Commands/Enums/CellPathDirection.cs:
--------------------------------------------------------------------------------
1 | namespace CgmInfo.Commands.Enums
2 | {
3 | public enum CellPathDirection
4 | {
5 | [TextToken("0")]
6 | Right_0deg = 0,
7 | [TextToken("90")]
8 | Down_90deg = 1,
9 | [TextToken("180")]
10 | Left_180deg = 2,
11 | [TextToken("270")]
12 | Up_270deg = 3,
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/Commands/Enums/EdgeOutFlags.cs:
--------------------------------------------------------------------------------
1 | namespace CgmInfo.Commands.Enums
2 | {
3 | public enum EdgeOutFlags
4 | {
5 | [TextToken("INVIS")]
6 | Invisible = 0,
7 | [TextToken("VIS")]
8 | Visible = 1,
9 | [TextToken("CLOSEINVIS")]
10 | InvisibleClose = 2,
11 | [TextToken("CLOSEVIS")]
12 | VisibleClose = 3,
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/Commands/Enums/WidthSpecificationModeType.cs:
--------------------------------------------------------------------------------
1 | namespace CgmInfo.Commands.Enums
2 | {
3 | public enum WidthSpecificationModeType
4 | {
5 | [TextToken("ABS")]
6 | Absolute = 0,
7 | [TextToken("SCALED")]
8 | Scaled = 1,
9 | [TextToken("FRACTIONAL")]
10 | Fractional = 2,
11 | [TextToken("MM")]
12 | Millimeters = 3,
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/Utilities/MetafilePoint.cs:
--------------------------------------------------------------------------------
1 | namespace CgmInfo.Utilities
2 | {
3 | public struct MetafilePoint
4 | {
5 | public MetafilePoint(double x, double y)
6 | {
7 | X = x;
8 | Y = y;
9 | }
10 | public double X { get; set; }
11 | public double Y { get; set; }
12 |
13 | public override string ToString() => $"X={X} Y={Y}";
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/Commands/Enums/DeviceViewportSpecificationModeType.cs:
--------------------------------------------------------------------------------
1 | namespace CgmInfo.Commands.Enums
2 | {
3 | public enum DeviceViewportSpecificationModeType
4 | {
5 | [TextToken("FRACTION")]
6 | FractionOfDrawingSurface = 0,
7 | [TextToken("MM")]
8 | MillimetersWithScaleFactor = 1,
9 | [TextToken("PHYDEVCOORD")]
10 | PhysicalDeviceCoordinates = 2,
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/Common.props:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | BhaaL
5 | BhaaL
6 | https://github.com/BhaaLseN/CgmInfo
7 | Git
8 | 3.0.0.0
9 | latest
10 | true
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/Commands/Enums/CharacterCodingAnnouncerType.cs:
--------------------------------------------------------------------------------
1 | namespace CgmInfo.Commands.Enums
2 | {
3 | public enum CharacterCodingAnnouncerType
4 | {
5 | [TextToken("BASIC7BIT")]
6 | Basic7Bit = 0,
7 | [TextToken("BASIC8BIT")]
8 | Basic8Bit = 1,
9 | [TextToken("EXTD7BIT")]
10 | Extended7Bit = 2,
11 | [TextToken("EXTD8BIT")]
12 | Extended8Bit = 3,
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/Commands/Enums/HorizontalTextAlignment.cs:
--------------------------------------------------------------------------------
1 | namespace CgmInfo.Commands.Enums
2 | {
3 | public enum HorizontalTextAlignment
4 | {
5 | [TextToken("NORMHORIZ")]
6 | Normal = 0,
7 | [TextToken("LEFT")]
8 | Left = 1,
9 | [TextToken("CTR")]
10 | Center = 2,
11 | [TextToken("RIGHT")]
12 | Right = 3,
13 | [TextToken("CONTHORIZ")]
14 | Continuous = 4,
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/Commands/StructuredDataElement.cs:
--------------------------------------------------------------------------------
1 | using CgmInfo.Commands.Enums;
2 |
3 | namespace CgmInfo.Commands
4 | {
5 | public class StructuredDataElement
6 | {
7 | public StructuredDataElement(DataTypeIndex type, object[] values)
8 | {
9 | Type = type;
10 | Values = values;
11 | }
12 |
13 | public DataTypeIndex Type { get; }
14 | public object[] Values { get; }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/StreamExtensions.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.IO;
3 |
4 | namespace CgmInfo
5 | {
6 | internal static class StreamExtensions
7 | {
8 | public static ushort ReadWord(this Stream stream)
9 | {
10 | if (stream == null)
11 | throw new ArgumentNullException(nameof(stream));
12 |
13 | return (ushort)((stream.ReadByte() << 8) | stream.ReadByte());
14 | }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/Commands/Delimiter/EndFigure.cs:
--------------------------------------------------------------------------------
1 | using CgmInfo.Traversal;
2 |
3 | namespace CgmInfo.Commands.Delimiter
4 | {
5 | [TextToken("ENDFIGURE")]
6 | public class EndFigure : Command
7 | {
8 | public EndFigure()
9 | : base(0, 9)
10 | {
11 | }
12 |
13 | public override void Accept(ICommandVisitor visitor, T parameter)
14 | {
15 | visitor.AcceptDelimiterEndFigure(this, parameter);
16 | }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/Commands/Delimiter/EndMetafile.cs:
--------------------------------------------------------------------------------
1 | using CgmInfo.Traversal;
2 |
3 | namespace CgmInfo.Commands.Delimiter
4 | {
5 | [TextToken("ENDMF")]
6 | public class EndMetafile : Command
7 | {
8 | public EndMetafile()
9 | : base(0, 2)
10 | {
11 | }
12 |
13 | public override void Accept(ICommandVisitor visitor, T parameter)
14 | {
15 | visitor.AcceptDelimiterEndMetafile(this, parameter);
16 | }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/Commands/Delimiter/EndPicture.cs:
--------------------------------------------------------------------------------
1 | using CgmInfo.Traversal;
2 |
3 | namespace CgmInfo.Commands.Delimiter
4 | {
5 | [TextToken("ENDPIC")]
6 | public class EndPicture : Command
7 | {
8 | public EndPicture()
9 | : base(0, 5)
10 | {
11 | }
12 |
13 | public override void Accept(ICommandVisitor visitor, T parameter)
14 | {
15 | visitor.AcceptDelimiterEndPicture(this, parameter);
16 | }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/Commands/Delimiter/EndSegment.cs:
--------------------------------------------------------------------------------
1 | using CgmInfo.Traversal;
2 |
3 | namespace CgmInfo.Commands.Delimiter
4 | {
5 | [TextToken("ENDSEG")]
6 | public class EndSegment : Command
7 | {
8 | public EndSegment()
9 | : base(0, 7)
10 | {
11 | }
12 |
13 | public override void Accept(ICommandVisitor visitor, T parameter)
14 | {
15 | visitor.AcceptDelimiterEndSegment(this, parameter);
16 | }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/Commands/Control/NewRegion.cs:
--------------------------------------------------------------------------------
1 | using CgmInfo.Traversal;
2 |
3 | namespace CgmInfo.Commands.MetafileDescriptor
4 | {
5 | [TextToken("NEWREGION")]
6 | public class NewRegion : Command
7 | {
8 | public NewRegion()
9 | : base(3, 10)
10 | {
11 | }
12 |
13 | public override void Accept(ICommandVisitor visitor, T parameter)
14 | {
15 | visitor.AcceptControlNewRegion(this, parameter);
16 | }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/Commands/Delimiter/BeginFigure.cs:
--------------------------------------------------------------------------------
1 | using CgmInfo.Traversal;
2 |
3 | namespace CgmInfo.Commands.Delimiter
4 | {
5 | [TextToken("BEGFIGURE")]
6 | public class BeginFigure : Command
7 | {
8 | public BeginFigure()
9 | : base(0, 8)
10 | {
11 | }
12 |
13 | public override void Accept(ICommandVisitor visitor, T parameter)
14 | {
15 | visitor.AcceptDelimiterBeginFigure(this, parameter);
16 | }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/Commands/Delimiter/EndTileArray.cs:
--------------------------------------------------------------------------------
1 | using CgmInfo.Traversal;
2 |
3 | namespace CgmInfo.Commands.Delimiter
4 | {
5 | [TextToken("ENDTILEARRAY")]
6 | public class EndTileArray : Command
7 | {
8 | public EndTileArray()
9 | : base(0, 20)
10 | {
11 | }
12 |
13 | public override void Accept(ICommandVisitor visitor, T parameter)
14 | {
15 | visitor.AcceptDelimiterEndTileArray(this, parameter);
16 | }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/Commands/Delimiter/BeginPictureBody.cs:
--------------------------------------------------------------------------------
1 | using CgmInfo.Traversal;
2 |
3 | namespace CgmInfo.Commands.Delimiter
4 | {
5 | [TextToken("BEGPICBODY")]
6 | public class BeginPictureBody : Command
7 | {
8 | public BeginPictureBody()
9 | : base(0, 4)
10 | {
11 | }
12 |
13 | public override void Accept(ICommandVisitor visitor, T parameter)
14 | {
15 | visitor.AcceptDelimiterBeginPictureBody(this, parameter);
16 | }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/Commands/Delimiter/EndCompoundLine.cs:
--------------------------------------------------------------------------------
1 | using CgmInfo.Traversal;
2 |
3 | namespace CgmInfo.Commands.Delimiter
4 | {
5 | [TextToken("ENDCOMPOLINE")]
6 | public class EndCompoundLine : Command
7 | {
8 | public EndCompoundLine()
9 | : base(0, 16)
10 | {
11 | }
12 |
13 | public override void Accept(ICommandVisitor visitor, T parameter)
14 | {
15 | visitor.AcceptDelimiterEndCompoundLine(this, parameter);
16 | }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/Commands/Enums/CharacterSetType.cs:
--------------------------------------------------------------------------------
1 | namespace CgmInfo.Commands.Enums
2 | {
3 | public enum CharacterSetType
4 | {
5 | [TextToken("STD94")]
6 | GSet94Characters = 0,
7 | [TextToken("STD96")]
8 | GSet96Characters = 1,
9 | [TextToken("STD94MULTIBYTE")]
10 | GSet94CharactersMultibyte = 2,
11 | [TextToken("STD96MULTIBYTE")]
12 | GSet96CharactersMultibyte = 3,
13 | [TextToken("COMPLETECODE")]
14 | CompleteCode = 4,
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/CgmInfoGui/ViewModels/Nodes/FontListNode.cs:
--------------------------------------------------------------------------------
1 | using System.Linq;
2 | using CgmInfo.Commands.MetafileDescriptor;
3 |
4 | namespace CgmInfoGui.ViewModels.Nodes;
5 |
6 | public class FontListNode : NodeBase
7 | {
8 | public FontListNode(FontList fontList)
9 | {
10 | Nodes.AddRange(fontList.Fonts.Select(font => new SimpleNode(font)));
11 | }
12 |
13 | public override string DisplayName
14 | {
15 | get { return string.Format("FONT LIST: [{0} entries]", Nodes.Count); }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/Commands/Delimiter/BeginCompoundLine.cs:
--------------------------------------------------------------------------------
1 | using CgmInfo.Traversal;
2 |
3 | namespace CgmInfo.Commands.Delimiter
4 | {
5 | [TextToken("BEGCOMPOLINE")]
6 | public class BeginCompoundLine : Command
7 | {
8 | public BeginCompoundLine()
9 | : base(0, 15)
10 | {
11 | }
12 |
13 | public override void Accept(ICommandVisitor visitor, T parameter)
14 | {
15 | visitor.AcceptDelimiterBeginCompoundLine(this, parameter);
16 | }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/Commands/Delimiter/EndProtectionRegion.cs:
--------------------------------------------------------------------------------
1 | using CgmInfo.Traversal;
2 |
3 | namespace CgmInfo.Commands.Delimiter
4 | {
5 | [TextToken("ENDPROTREGION")]
6 | public class EndProtectionRegion : Command
7 | {
8 | public EndProtectionRegion()
9 | : base(0, 14)
10 | {
11 | }
12 |
13 | public override void Accept(ICommandVisitor visitor, T parameter)
14 | {
15 | visitor.AcceptDelimiterEndProtectionRegion(this, parameter);
16 | }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/CgmInfoGui/ViewModels/Nodes/Sources/ITileSource.cs:
--------------------------------------------------------------------------------
1 | using CgmInfo.Commands;
2 |
3 | namespace CgmInfoGui.ViewModels.Nodes.Sources;
4 |
5 | public interface ITileSource
6 | {
7 | bool IsBlackAndWhite { get; }
8 | int CompressionType { get; }
9 | byte[] CompressedCells { get; }
10 | StructuredDataRecord Parameters { get; }
11 |
12 | // Width/Height in Pixels
13 | int Width { get; }
14 | int Height { get; }
15 | int DpiX { get; }
16 | int DpiY { get; }
17 | int ColorPrecision { get; }
18 | }
19 |
--------------------------------------------------------------------------------
/Commands/Delimiter/EndCompoundTextPath.cs:
--------------------------------------------------------------------------------
1 | using CgmInfo.Traversal;
2 |
3 | namespace CgmInfo.Commands.Delimiter
4 | {
5 | [TextToken("ENDCOMPOTEXTPATH")]
6 | public class EndCompoundTextPath : Command
7 | {
8 | public EndCompoundTextPath()
9 | : base(0, 18)
10 | {
11 | }
12 |
13 | public override void Accept(ICommandVisitor visitor, T parameter)
14 | {
15 | visitor.AcceptDelimiterEndCompoundTextPath(this, parameter);
16 | }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/Commands/GraphicalPrimitives/ConnectingEdge.cs:
--------------------------------------------------------------------------------
1 | using CgmInfo.Traversal;
2 |
3 | namespace CgmInfo.Commands.GraphicalPrimitives
4 | {
5 | [TextToken("CONNEDGE")]
6 | public class ConnectingEdge : Command
7 | {
8 | public ConnectingEdge()
9 | : base(4, 21)
10 | {
11 | }
12 |
13 | public override void Accept(ICommandVisitor visitor, T parameter)
14 | {
15 | visitor.AcceptGraphicalPrimitiveConnectingEdge(this, parameter);
16 | }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/Commands/Delimiter/EndApplicationStructure.cs:
--------------------------------------------------------------------------------
1 | using CgmInfo.Traversal;
2 |
3 | namespace CgmInfo.Commands.Delimiter
4 | {
5 | [TextToken("ENDAPS")]
6 | public class EndApplicationStructure : Command
7 | {
8 | public EndApplicationStructure()
9 | : base(0, 23)
10 | {
11 | }
12 |
13 | public override void Accept(ICommandVisitor visitor, T parameter)
14 | {
15 | visitor.AcceptDelimiterEndApplicationStructure(this, parameter);
16 | }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/Commands/Delimiter/BeginCompoundTextPath.cs:
--------------------------------------------------------------------------------
1 | using CgmInfo.Traversal;
2 |
3 | namespace CgmInfo.Commands.Delimiter
4 | {
5 | [TextToken("BEGCOMPOTEXTPATH")]
6 | public class BeginCompoundTextPath : Command
7 | {
8 | public BeginCompoundTextPath()
9 | : base(0, 17)
10 | {
11 | }
12 |
13 | public override void Accept(ICommandVisitor visitor, T parameter)
14 | {
15 | visitor.AcceptDelimiterBeginCompoundTextPath(this, parameter);
16 | }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/Commands/Segment/InheritanceFilterItem.cs:
--------------------------------------------------------------------------------
1 | using CgmInfo.Commands.Enums;
2 |
3 | namespace CgmInfo.Commands.Segment
4 | {
5 | public class InheritanceFilterItem
6 | {
7 | public InheritanceFilterItem(InheritanceFilterDesignator designator, InheritanceFilterSetting setting)
8 | {
9 | Designator = designator;
10 | Setting = setting;
11 | }
12 |
13 | public InheritanceFilterDesignator Designator { get; }
14 | public InheritanceFilterSetting Setting { get; }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/CgmInfoGui/ViewModels/Nodes/PictureNode.cs:
--------------------------------------------------------------------------------
1 | namespace CgmInfoGui.ViewModels.Nodes;
2 |
3 | public class PictureNode : NodeBase
4 | {
5 | public PictureNode(string name)
6 | {
7 | Name = name;
8 | Descriptor = new SimpleNode("PICTURE DESCRIPTOR");
9 | Nodes.Add(Descriptor);
10 | }
11 | public string Name { get; }
12 | public SimpleNode Descriptor { get; }
13 |
14 | public override string DisplayName
15 | {
16 | get { return string.Format("BEGIN PICTURE: '{0}'", Name); }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/Commands/Enums/VerticalTextAlignment.cs:
--------------------------------------------------------------------------------
1 | namespace CgmInfo.Commands.Enums
2 | {
3 | public enum VerticalTextAlignment
4 | {
5 | [TextToken("NORMVERT")]
6 | Normal = 0,
7 | [TextToken("TOP")]
8 | Top = 1,
9 | [TextToken("CAP")]
10 | Cap = 2,
11 | [TextToken("HALF")]
12 | Half = 3,
13 | [TextToken("BASE")]
14 | Base = 4,
15 | [TextToken("BOTTOM")]
16 | Bottom = 5,
17 | [TextToken("CONTVERT")]
18 | Continuous = 6,
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/CgmInfoGui/ViewModels/Nodes/MetafileNode.cs:
--------------------------------------------------------------------------------
1 | namespace CgmInfoGui.ViewModels.Nodes;
2 |
3 | public class MetafileNode : NodeBase
4 | {
5 | public MetafileNode(string name)
6 | {
7 | Name = name;
8 | Descriptor = new SimpleNode("METAFILE DESCRIPTOR");
9 | Nodes.Add(Descriptor);
10 | }
11 | public string Name { get; }
12 | public SimpleNode Descriptor { get; }
13 |
14 | public override string DisplayName
15 | {
16 | get { return string.Format("BEGIN METAFILE: '{0}'", Name); }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/TextEncoding/ApplicationStructureDescriptorReader.cs:
--------------------------------------------------------------------------------
1 | using CgmInfo.Commands.ApplicationStructureDescriptor;
2 |
3 | namespace CgmInfo.TextEncoding
4 | {
5 | internal static class ApplicationStructureDescriptorReader
6 | {
7 | public static ApplicationStructureAttribute ApplicationStructureAttribute(MetafileReader reader)
8 | {
9 | string attributeType = reader.ReadString();
10 | return new ApplicationStructureAttribute(attributeType, reader.ReadStructuredDataRecord());
11 | }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/Commands/Enums/InteriorStyleType.cs:
--------------------------------------------------------------------------------
1 | namespace CgmInfo.Commands.Enums
2 | {
3 | public enum InteriorStyleType
4 | {
5 | [TextToken("HOLLOW")]
6 | Hollow = 0,
7 | [TextToken("SOLID")]
8 | Solid = 1,
9 | [TextToken("PAT")]
10 | Pattern = 2,
11 | [TextToken("HATCH")]
12 | Hatch = 3,
13 | [TextToken("EMPTY")]
14 | Empty = 4,
15 | [TextToken("GEOPAT")]
16 | GeometricPattern = 5,
17 | [TextToken("INTERP")]
18 | Interpolated = 6,
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/CgmInfoGui/ViewModels/Nodes/SegmentNode.cs:
--------------------------------------------------------------------------------
1 | namespace CgmInfoGui.ViewModels.Nodes;
2 |
3 | public class SegmentNode : NodeBase
4 | {
5 | public SegmentNode(int identifier)
6 | {
7 | Identifier = identifier;
8 | Descriptor = new SimpleNode("SEGMENT DESCRIPTOR");
9 | Nodes.Add(Descriptor);
10 | }
11 | public int Identifier { get; }
12 | public SimpleNode Descriptor { get; }
13 |
14 | public override string DisplayName
15 | {
16 | get { return string.Format("BEGIN SEGMENT: {0}", Identifier); }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/Commands/Delimiter/BeginApplicationStructureBody.cs:
--------------------------------------------------------------------------------
1 | using CgmInfo.Traversal;
2 |
3 | namespace CgmInfo.Commands.Delimiter
4 | {
5 | [TextToken("BEGAPSBODY")]
6 | public class BeginApplicationStructureBody : Command
7 | {
8 | public BeginApplicationStructureBody()
9 | : base(0, 22)
10 | {
11 | }
12 |
13 | public override void Accept(ICommandVisitor visitor, T parameter)
14 | {
15 | visitor.AcceptDelimiterBeginApplicationStructureBody(this, parameter);
16 | }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/Commands/Attributes/EdgeWidth.cs:
--------------------------------------------------------------------------------
1 | using CgmInfo.Traversal;
2 |
3 | namespace CgmInfo.Commands.Attributes
4 | {
5 | [TextToken("EDGEWIDTH")]
6 | public class EdgeWidth : Command
7 | {
8 | public EdgeWidth(double width)
9 | : base(5, 28)
10 | {
11 | Width = width;
12 | }
13 |
14 | public double Width { get; }
15 |
16 | public override void Accept(ICommandVisitor visitor, T parameter)
17 | {
18 | visitor.AcceptAttributeEdgeWidth(this, parameter);
19 | }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/Commands/Attributes/LineWidth.cs:
--------------------------------------------------------------------------------
1 | using CgmInfo.Traversal;
2 |
3 | namespace CgmInfo.Commands.Attributes
4 | {
5 | [TextToken("LINEWIDTH")]
6 | public class LineWidth : Command
7 | {
8 | public LineWidth(double width)
9 | : base(5, 3)
10 | {
11 | Width = width;
12 | }
13 |
14 | public double Width { get; }
15 |
16 | public override void Accept(ICommandVisitor visitor, T parameter)
17 | {
18 | visitor.AcceptAttributeLineWidth(this, parameter);
19 | }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/Commands/Attributes/MarkerSize.cs:
--------------------------------------------------------------------------------
1 | using CgmInfo.Traversal;
2 |
3 | namespace CgmInfo.Commands.Attributes
4 | {
5 | [TextToken("MARKERSIZE")]
6 | public class MarkerSize : Command
7 | {
8 | public MarkerSize(double size)
9 | : base(5, 7)
10 | {
11 | Size = size;
12 | }
13 |
14 | public double Size { get; }
15 |
16 | public override void Accept(ICommandVisitor visitor, T parameter)
17 | {
18 | visitor.AcceptAttributeMarkerSize(this, parameter);
19 | }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/Commands/Attributes/PatternIndex.cs:
--------------------------------------------------------------------------------
1 | using CgmInfo.Traversal;
2 |
3 | namespace CgmInfo.Commands.Attributes
4 | {
5 | [TextToken("PATINDEX")]
6 | public class PatternIndex : Command
7 | {
8 | public PatternIndex(int index)
9 | : base(5, 25)
10 | {
11 | Index = index;
12 | }
13 |
14 | public int Index { get; }
15 |
16 | public override void Accept(ICommandVisitor visitor, T parameter)
17 | {
18 | visitor.AcceptAttributePatternIndex(this, parameter);
19 | }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/Commands/Delimiter/BeginMetafile.cs:
--------------------------------------------------------------------------------
1 | using CgmInfo.Traversal;
2 |
3 | namespace CgmInfo.Commands.Delimiter
4 | {
5 | [TextToken("BEGMF")]
6 | public class BeginMetafile : Command
7 | {
8 | public BeginMetafile(string name)
9 | : base(0, 1)
10 | {
11 | Name = name;
12 | }
13 |
14 | public string Name { get; }
15 |
16 | public override void Accept(ICommandVisitor visitor, T parameter)
17 | {
18 | visitor.AcceptDelimiterBeginMetafile(this, parameter);
19 | }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/Commands/Delimiter/BeginPicture.cs:
--------------------------------------------------------------------------------
1 | using CgmInfo.Traversal;
2 |
3 | namespace CgmInfo.Commands.Delimiter
4 | {
5 | [TextToken("BEGPIC")]
6 | public class BeginPicture : Command
7 | {
8 | public BeginPicture(string name)
9 | : base(0, 3)
10 | {
11 | Name = name;
12 | }
13 |
14 | public string Name { get; }
15 |
16 | public override void Accept(ICommandVisitor visitor, T parameter)
17 | {
18 | visitor.AcceptDelimiterBeginPicture(this, parameter);
19 | }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/CgmInfoGui/Controls/PropertyGrid/ReadOnlyPropertyGrid.axaml.cs:
--------------------------------------------------------------------------------
1 | using Avalonia;
2 | using Avalonia.Controls.Primitives;
3 |
4 | namespace CgmInfoGui.Controls.PropertyGrid;
5 |
6 | public class ReadOnlyPropertyGrid : TemplatedControl
7 | {
8 | public static readonly StyledProperty