// Generated API outline. Implementation bodies omitted.
#nullable enable
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Net.Http;
using System.Threading.Tasks;
using System.Threading;
using System;
using nfloat = System.Runtime.InteropServices.NFloat;
using static Xui.Core.Math2D.Constants;
namespace Xui.Core.Canvas.Composition.Commands.Records
{
using System.Runtime.InteropServices;
using Xui.Core.Math2D;
/// Packed operands for the Arc canvas operation.
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct ArcCommand
{
/// The command discriminator, at byte offset zero.
public CanvasOp Op;
/// The Center operand.
public Point Center;
/// The Radius operand.
public nfloat Radius;
/// The StartAngle operand.
public nfloat StartAngle;
/// The EndAngle operand.
public nfloat EndAngle;
/// The Winding operand.
public Winding Winding;
/// Initializes the discriminator and zeroes the operands.
public ArcCommand();
}
/// Packed operands for the ArcTo canvas operation.
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct ArcToCommand
{
/// The command discriminator, at byte offset zero.
public CanvasOp Op;
/// The Control operand.
public Point Control;
/// The End operand.
public Point End;
/// The Radius operand.
public nfloat Radius;
/// Initializes the discriminator and zeroes the operands.
public ArcToCommand();
}
/// Packed operands for the Cubic canvas operation.
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct CubicCommand
{
/// The command discriminator, at byte offset zero.
public CanvasOp Op;
/// The Control1 operand.
public Point Control1;
/// The Control2 operand.
public Point Control2;
/// The End operand.
public Point End;
/// Initializes the discriminator and zeroes the operands.
public CubicCommand();
}
/// Packed operands for the Ellipse canvas operation.
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct EllipseCommand
{
/// The command discriminator, at byte offset zero.
public CanvasOp Op;
/// The Center operand.
public Point Center;
/// The RadiusX operand.
public nfloat RadiusX;
/// The RadiusY operand.
public nfloat RadiusY;
/// The Rotation operand.
public nfloat Rotation;
/// The StartAngle operand.
public nfloat StartAngle;
/// The EndAngle operand.
public nfloat EndAngle;
/// The Winding operand.
public Winding Winding;
/// Initializes the discriminator and zeroes the operands.
public EllipseCommand();
}
/// Packed operands for the FillLinear canvas operation.
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct FillLinearCommand
{
/// The command discriminator, at byte offset zero.
public CanvasOp Op;
/// The StartPoint operand.
public Point StartPoint;
/// The EndPoint operand.
public Point EndPoint;
/// Number of GradientStop elements stored immediately after this record.
public int Length;
/// Initializes the discriminator and zeroes the operands.
public FillLinearCommand();
}
/// Packed operands for the FillRadial canvas operation.
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct FillRadialCommand
{
/// The command discriminator, at byte offset zero.
public CanvasOp Op;
/// The StartCenter operand.
public Point StartCenter;
/// The StartRadius operand.
public nfloat StartRadius;
/// The EndCenter operand.
public Point EndCenter;
/// The EndRadius operand.
public nfloat EndRadius;
/// Number of GradientStop elements stored immediately after this record.
public int Length;
/// Initializes the discriminator and zeroes the operands.
public FillRadialCommand();
}
/// Packed operands for the FillRect canvas operation.
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct FillRectCommand
{
/// The command discriminator, at byte offset zero.
public CanvasOp Op;
/// The Bounds operand.
public Rect Bounds;
/// Initializes the discriminator and zeroes the operands.
public FillRectCommand();
}
/// Packed operands for the Image canvas operation.
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct ImageCommand
{
/// The command discriminator, at byte offset zero.
public CanvasOp Op;
/// The image object retained in the shared resource list.
public ResourceRef Image;
/// The Destination operand.
public Rect Destination;
/// The Opacity operand.
public nfloat Opacity;
/// Initializes the discriminator and zeroes the operands.
public ImageCommand();
}
/// Packed operands for the ImageCrop canvas operation.
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct ImageCropCommand
{
/// The command discriminator, at byte offset zero.
public CanvasOp Op;
/// The image object retained in the shared resource list.
public ResourceRef Image;
/// The Source operand.
public Rect Source;
/// The Destination operand.
public Rect Destination;
/// The Opacity operand.
public nfloat Opacity;
/// Initializes the discriminator and zeroes the operands.
public ImageCropCommand();
}
/// Packed operands for the LineTo canvas operation.
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct LineToCommand
{
/// The command discriminator, at byte offset zero.
public CanvasOp Op;
/// The Position operand.
public Point Position;
/// Initializes the discriminator and zeroes the operands.
public LineToCommand();
}
/// Packed operands for the MoveTo canvas operation.
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct MoveToCommand
{
/// The command discriminator, at byte offset zero.
public CanvasOp Op;
/// The Position operand.
public Point Position;
/// Initializes the discriminator and zeroes the operands.
public MoveToCommand();
}
/// Packed operands for the Quadratic canvas operation.
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct QuadraticCommand
{
/// The command discriminator, at byte offset zero.
public CanvasOp Op;
/// The Control operand.
public Point Control;
/// The End operand.
public Point End;
/// Initializes the discriminator and zeroes the operands.
public QuadraticCommand();
}
/// Packed operands for the Rect canvas operation.
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct RectCommand
{
/// The command discriminator, at byte offset zero.
public CanvasOp Op;
/// The Bounds operand.
public Rect Bounds;
/// Initializes the discriminator and zeroes the operands.
public RectCommand();
}
/// Packed operands for the RoundRect canvas operation.
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct RoundRectCommand
{
/// The command discriminator, at byte offset zero.
public CanvasOp Op;
/// The Bounds operand.
public Rect Bounds;
/// The Corners operand.
public CornerRadius Corners;
/// Initializes the discriminator and zeroes the operands.
public RoundRectCommand();
}
/// Packed operands for the Scale canvas operation.
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct ScaleCommand
{
/// The command discriminator, at byte offset zero.
public CanvasOp Op;
/// The Value operand.
public Vector Value;
/// Initializes the discriminator and zeroes the operands.
public ScaleCommand();
}
/// Packed operands for the SetTransform canvas operation.
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct SetTransformCommand
{
/// The command discriminator, at byte offset zero.
public CanvasOp Op;
/// The Value operand.
public AffineTransform Value;
/// Initializes the discriminator and zeroes the operands.
public SetTransformCommand();
}
/// Packed operands for the StrokeLinear canvas operation.
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct StrokeLinearCommand
{
/// The command discriminator, at byte offset zero.
public CanvasOp Op;
/// The StartPoint operand.
public Point StartPoint;
/// The EndPoint operand.
public Point EndPoint;
/// Number of GradientStop elements stored immediately after this record.
public int Length;
/// Initializes the discriminator and zeroes the operands.
public StrokeLinearCommand();
}
/// Packed operands for the StrokeRadial canvas operation.
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct StrokeRadialCommand
{
/// The command discriminator, at byte offset zero.
public CanvasOp Op;
/// The StartCenter operand.
public Point StartCenter;
/// The StartRadius operand.
public nfloat StartRadius;
/// The EndCenter operand.
public Point EndCenter;
/// The EndRadius operand.
public nfloat EndRadius;
/// Number of GradientStop elements stored immediately after this record.
public int Length;
/// Initializes the discriminator and zeroes the operands.
public StrokeRadialCommand();
}
/// Packed operands for the StrokeRect canvas operation.
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct StrokeRectCommand
{
/// The command discriminator, at byte offset zero.
public CanvasOp Op;
/// The Bounds operand.
public Rect Bounds;
/// Initializes the discriminator and zeroes the operands.
public StrokeRectCommand();
}
/// Draws text copied from a span into the binary stream immediately after this record.
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct TextCommand
{
/// The command discriminator, at byte offset zero.
public CanvasOp Op;
/// The Position operand.
public Point Position;
/// Number of char elements stored immediately after this record.
public int Length;
/// Initializes the discriminator and zeroes the operands.
public TextCommand();
}
/// Draws a string retained by reference in the shared resource list.
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct TextResourceCommand
{
/// The command discriminator, at byte offset zero.
public CanvasOp Op;
/// The text drawing position.
public Point Position;
/// The retained string. Span-based text uses TextCommand instead.
public ResourceRef Text;
/// Initializes the discriminator and zeroes the operands.
public TextResourceCommand();
}
/// Packed operands for the Transform canvas operation.
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct TransformCommand
{
/// The command discriminator, at byte offset zero.
public CanvasOp Op;
/// The Value operand.
public AffineTransform Value;
/// Initializes the discriminator and zeroes the operands.
public TransformCommand();
}
/// Packed operands for the Translate canvas operation.
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct TranslateCommand
{
/// The command discriminator, at byte offset zero.
public CanvasOp Op;
/// The Value operand.
public Vector Value;
/// Initializes the discriminator and zeroes the operands.
public TranslateCommand();
}
}
namespace Xui.Core.Canvas.Composition.Commands.Records
{
using System.Runtime.InteropServices;
/// Packed operands for the BeginPath canvas operation.
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct BeginPathCommand
{
/// The command discriminator, at byte offset zero.
public CanvasOp Op;
/// Initializes the discriminator and zeroes the operands.
public BeginPathCommand();
}
/// Packed operands for the Brightness canvas operation.
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct BrightnessCommand
{
/// The command discriminator, at byte offset zero.
public CanvasOp Op;
/// The Amount operand.
public nfloat Amount;
/// Initializes the discriminator and zeroes the operands.
public BrightnessCommand();
}
/// Packed operands for the Clip canvas operation.
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct ClipCommand
{
/// The command discriminator, at byte offset zero.
public CanvasOp Op;
/// Initializes the discriminator and zeroes the operands.
public ClipCommand();
}
/// Packed operands for the ClosePath canvas operation.
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct ClosePathCommand
{
/// The command discriminator, at byte offset zero.
public CanvasOp Op;
/// Initializes the discriminator and zeroes the operands.
public ClosePathCommand();
}
/// The common prefix of every packed canvas command.
/// Read from a command boundary with MemoryMarshal.Read. Records contain no managed
/// references and use process-local nfloat widths; this is not a portable file format.
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct Command
{
/// Identifies the concrete header; variable-length headers also specify their payload length.
public CanvasOp Op;
}
/// Packed operands for the Dashes canvas operation.
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct DashesCommand
{
/// The command discriminator, at byte offset zero.
public CanvasOp Op;
/// Number of nfloat elements stored immediately after this record.
public int Length;
/// Initializes the discriminator and zeroes the operands.
public DashesCommand();
}
/// Packed operands for the FillColor canvas operation.
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct FillColorCommand
{
/// The command discriminator, at byte offset zero.
public CanvasOp Op;
/// The Color operand.
public Color Color;
/// Initializes the discriminator and zeroes the operands.
public FillColorCommand();
}
/// Packed operands for the Fill canvas operation.
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct FillCommand
{
/// The command discriminator, at byte offset zero.
public CanvasOp Op;
/// The Rule operand.
public FillRule Rule;
/// Initializes the discriminator and zeroes the operands.
public FillCommand();
}
/// Packed operands for the FillPattern canvas operation.
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct FillPatternCommand
{
/// The command discriminator, at byte offset zero.
public CanvasOp Op;
/// The image object retained in the shared resource list.
public ResourceRef Image;
/// The Repeat operand.
public PatternRepeat Repeat;
/// Initializes the discriminator and zeroes the operands.
public FillPatternCommand();
}
/// Packed operands for the FilterNone canvas operation.
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct FilterNoneCommand
{
/// The command discriminator, at byte offset zero.
public CanvasOp Op;
/// Initializes the discriminator and zeroes the operands.
public FilterNoneCommand();
}
/// Packed operands for the Font canvas operation.
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct FontCommand
{
/// The command discriminator, at byte offset zero.
public CanvasOp Op;
/// The family-name string retained in the shared resource list.
public ResourceRef Family;
/// The font size.
public nfloat Size;
/// The font weight.
public FontWeight Weight;
/// The font style, stored inline without boxing.
public FontStyle Style;
/// The font stretch.
public FontStretch Stretch;
/// The line height.
public nfloat LineHeight;
/// Initializes the discriminator and zeroes the operands.
public FontCommand();
}
/// Packed operands for the GlobalAlpha canvas operation.
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct GlobalAlphaCommand
{
/// The command discriminator, at byte offset zero.
public CanvasOp Op;
/// The Value operand.
public nfloat Value;
/// Initializes the discriminator and zeroes the operands.
public GlobalAlphaCommand();
}
/// Packed operands for the LineCap canvas operation.
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct LineCapCommand
{
/// The command discriminator, at byte offset zero.
public CanvasOp Op;
/// The Value operand.
public LineCap Value;
/// Initializes the discriminator and zeroes the operands.
public LineCapCommand();
}
/// Packed operands for the LineDashOffset canvas operation.
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct LineDashOffsetCommand
{
/// The command discriminator, at byte offset zero.
public CanvasOp Op;
/// The Value operand.
public nfloat Value;
/// Initializes the discriminator and zeroes the operands.
public LineDashOffsetCommand();
}
/// Packed operands for the LineJoin canvas operation.
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct LineJoinCommand
{
/// The command discriminator, at byte offset zero.
public CanvasOp Op;
/// The Value operand.
public LineJoin Value;
/// Initializes the discriminator and zeroes the operands.
public LineJoinCommand();
}
/// Packed operands for the LineWidth canvas operation.
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct LineWidthCommand
{
/// The command discriminator, at byte offset zero.
public CanvasOp Op;
/// The Value operand.
public nfloat Value;
/// Initializes the discriminator and zeroes the operands.
public LineWidthCommand();
}
/// Packed operands for the MiterLimit canvas operation.
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct MiterLimitCommand
{
/// The command discriminator, at byte offset zero.
public CanvasOp Op;
/// The Value operand.
public nfloat Value;
/// Initializes the discriminator and zeroes the operands.
public MiterLimitCommand();
}
/// Packed operands for the Restore canvas operation.
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct RestoreCommand
{
/// The command discriminator, at byte offset zero.
public CanvasOp Op;
/// Initializes the discriminator and zeroes the operands.
public RestoreCommand();
}
/// Packed operands for the Rotate canvas operation.
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct RotateCommand
{
/// The command discriminator, at byte offset zero.
public CanvasOp Op;
/// The Angle operand.
public nfloat Angle;
/// Initializes the discriminator and zeroes the operands.
public RotateCommand();
}
/// Packed operands for the Save canvas operation.
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct SaveCommand
{
/// The command discriminator, at byte offset zero.
public CanvasOp Op;
/// Initializes the discriminator and zeroes the operands.
public SaveCommand();
}
/// Packed operands for the StrokeColor canvas operation.
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct StrokeColorCommand
{
/// The command discriminator, at byte offset zero.
public CanvasOp Op;
/// The Color operand.
public Color Color;
/// Initializes the discriminator and zeroes the operands.
public StrokeColorCommand();
}
/// Packed operands for the Stroke canvas operation.
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct StrokeCommand
{
/// The command discriminator, at byte offset zero.
public CanvasOp Op;
/// Initializes the discriminator and zeroes the operands.
public StrokeCommand();
}
/// Packed operands for the StrokePattern canvas operation.
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct StrokePatternCommand
{
/// The command discriminator, at byte offset zero.
public CanvasOp Op;
/// The image object retained in the shared resource list.
public ResourceRef Image;
/// The Repeat operand.
public PatternRepeat Repeat;
/// Initializes the discriminator and zeroes the operands.
public StrokePatternCommand();
}
/// A retained reference to an immutable symbol definition.
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct SymbolCommand
{
/// Operation discriminator.
public CanvasOp Op;
/// SymbolContent in the buffer's resource table.
public ResourceRef Content;
/// Initializes the operation.
public SymbolCommand();
}
/// Packed operands for the TextAlign canvas operation.
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct TextAlignCommand
{
/// The command discriminator, at byte offset zero.
public CanvasOp Op;
/// The Value operand.
public TextAlign Value;
/// Initializes the discriminator and zeroes the operands.
public TextAlignCommand();
}
/// Packed operands for the TextBaseline canvas operation.
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct TextBaselineCommand
{
/// The command discriminator, at byte offset zero.
public CanvasOp Op;
/// The Value operand.
public TextBaseline Value;
/// Initializes the discriminator and zeroes the operands.
public TextBaselineCommand();
}
}