Class GraphicsMethodStatementNode
- Namespace
- RDCore.SDK.Model.AST.Statements
- Assembly
- RDCore.SDK.dll
RD-VBAL the graphics methods that are written as statements, with a syntax of their own: Circle, Line, PSet and Scale.
public record GraphicsMethodStatementNode : StatementNode, IEquatable<SyntaxNode>, IExecutableNode, IEquatable<StatementNode>, IEquatable<GraphicsMethodStatementNode>
- Inheritance
-
GraphicsMethodStatementNode
- Implements
- Inherited Members
- Extension Methods
Remarks
MS-VBAL reserves Circle and Scale as special forms (§3.3.5.2) and PSet as a reserved name, and gives none of them a syntax: they are the
methods of the objects that can be drawn on (a form, a picture box, a printer), and what a method of such an object takes is not a list of arguments but
coordinate pairs, Step and -:
[object.]Circle [Step] (x, y), radius [, color [, start [, end [, aspect]]]]
[object.]Line [[Step] (x1, y1)] - [Step] (x2, y2) [, [color] [, B | BF]]
[object.]PSet [Step] (x, y) [, color]
[object.]Scale [(x1, y1) - (x2, y2)]
Every part of that is kept where the source wrote it. An omitted argument stays omitted (null in Arguments): Circle (1, 1), 2, , 3
has a color that is not there, which is not the same as a color that is zero.
Constructors
GraphicsMethodStatementNode(SyntaxNodeId, SourceLocation, string, ExpressionNode?, bool, GraphicsPointNode?, GraphicsPointNode?, ImmutableArray<ExpressionNode?>, string?)
RD-VBAL the graphics methods that are written as statements, with a syntax of their own: Circle, Line, PSet and Scale.
public GraphicsMethodStatementNode(SyntaxNodeId Identity, SourceLocation SourceLocation, string Token, ExpressionNode? Target, bool IsWithRelative, GraphicsPointNode? From, GraphicsPointNode? To, ImmutableArray<ExpressionNode?> Arguments, string? LineOption)
Parameters
IdentitySyntaxNodeIdA unique identifier for this specific syntax node.
SourceLocationSourceLocationThe document location (
Uri+Range) of the statement.TokenstringWhich of the four statements this is:
Circle,Line,PSetorScale(seeTokens).TargetExpressionNodeThe object before the dot, or null when the statement is written without one - or, for
Linein aWithblock, with a dot and nothing before it (see IsWithRelative).IsWithRelativeboolWhether the statement is written
.Line, which is theLinemember of the object of the enclosingWithblock.FromGraphicsPointNodeThe first point: the center of a
Circle, the point of aPSet, the start of aLine(null when the line starts where the last one ended), or the first corner of aScale(null for aScalewritten with no corners, which sets the scale back to twips).ToGraphicsPointNodeThe second point of a
Lineor aScale: the end of the line, or the second corner; null for the others, and for aScalewritten with no corners.ArgumentsImmutableArray<ExpressionNode>The expressions that follow the points, in order, null where one is omitted: the radius, color, start, end and aspect of a
Circle; the color of aLineor aPSet. Empty for aScale.LineOptionstringThe
BorBFthat makes aLinea box, as it was written, or null when there is none.
Remarks
MS-VBAL reserves Circle and Scale as special forms (§3.3.5.2) and PSet as a reserved name, and gives none of them a syntax: they are the
methods of the objects that can be drawn on (a form, a picture box, a printer), and what a method of such an object takes is not a list of arguments but
coordinate pairs, Step and -:
[object.]Circle [Step] (x, y), radius [, color [, start [, end [, aspect]]]]
[object.]Line [[Step] (x1, y1)] - [Step] (x2, y2) [, [color] [, B | BF]]
[object.]PSet [Step] (x, y) [, color]
[object.]Scale [(x1, y1) - (x2, y2)]
Every part of that is kept where the source wrote it. An omitted argument stays omitted (null in Arguments): Circle (1, 1), 2, , 3
has a color that is not there, which is not the same as a color that is zero.
Properties
Arguments
The expressions that follow the points, in order, null where one is omitted: the radius, color, start, end and aspect of a Circle; the color
of a Line or a PSet. Empty for a Scale.
public ImmutableArray<ExpressionNode?> Arguments { get; init; }
Property Value
From
The first point: the center of a Circle, the point of a PSet, the start of a Line (null when the line starts where the last one ended), or the
first corner of a Scale (null for a Scale written with no corners, which sets the scale back to twips).
public GraphicsPointNode? From { get; init; }
Property Value
IsWithRelative
Whether the statement is written .Line, which is the Line member of the object of the enclosing With block.
public bool IsWithRelative { get; init; }
Property Value
LineOption
The B or BF that makes a Line a box, as it was written, or null when there is none.
public string? LineOption { get; init; }
Property Value
Target
The object before the dot, or null when the statement is written without one - or, for Line in a With block, with a dot and
nothing before it (see IsWithRelative).
public ExpressionNode? Target { get; init; }
Property Value
To
The second point of a Line or a Scale: the end of the line, or the second corner; null for the others, and for a Scale written with no corners.
public GraphicsPointNode? To { get; init; }
Property Value
Token
Which of the four statements this is: Circle, Line, PSet or Scale (see Tokens).
public string Token { get; init; }