Table of Contents

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

Identity SyntaxNodeId

A unique identifier for this specific syntax node.

SourceLocation SourceLocation

The document location (Uri+Range) of the statement.

Token string

Which of the four statements this is: Circle, Line, PSet or Scale (see Tokens).

Target ExpressionNode

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).

IsWithRelative bool

Whether the statement is written .Line, which is the Line member of the object of the enclosing With block.

From GraphicsPointNode

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.

To GraphicsPointNode

The second point of a Line or a Scale, which have one; null for the others.

Arguments ImmutableArray<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 a Line or a PSet. Empty for a Scale.

LineOption string

The B or BF that makes a Line a 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

ImmutableArray<ExpressionNode>

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.

public GraphicsPointNode? From { get; init; }

Property Value

GraphicsPointNode

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

bool

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

string

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

ExpressionNode

To

The second point of a Line or a Scale, which have one; null for the others.

public GraphicsPointNode? To { get; init; }

Property Value

GraphicsPointNode

Token

Which of the four statements this is: Circle, Line, PSet or Scale (see Tokens).

public string Token { get; init; }

Property Value

string