Header menu logo Mibo

Command2D Type

Closed set of 2D render commands. Stored in RenderBuffer2D and dispatched via pattern matching — no interface boxing.

Each case carries a layer: int<RenderLayer> for stable layer sorting. This is the MonoGame backend's equivalent of the raylib Command2D DU, using MonoGame types (Texture2D, SpriteFont, Rectangle, etc.).

Union cases

Union case Description

BeginCamera(beginCameraCam, layer)

Full Usage: BeginCamera(beginCameraCam, layer)

Parameters:
beginCameraCam : Camera2D
layer : int<MeasureProduct<RenderLayer, MeasureOne>>

BeginCameraConfig(config, layer)

Full Usage: BeginCameraConfig(config, layer)

Parameters:

BeginShader(shader, layer)

Full Usage: BeginShader(shader, layer)

Parameters:

BeginTarget(target, layer)

Full Usage: BeginTarget(target, layer)

Parameters:

Bezier(bezierStart, bezierControl, bezierFinish, bezierThickness, bezierColor, layer)

Full Usage: Bezier(bezierStart, bezierControl, bezierFinish, bezierThickness, bezierColor, layer)

Parameters:
bezierStart : Vector2
bezierControl : Vector2
bezierFinish : Vector2
bezierThickness : float32
bezierColor : Color
layer : int<MeasureProduct<RenderLayer, MeasureOne>>

CircleGradient(circleGradCenterX, circleGradCenterY, circleGradRadius, circleGradInner, circleGradOuter, layer)

Full Usage: CircleGradient(circleGradCenterX, circleGradCenterY, circleGradRadius, circleGradInner, circleGradOuter, layer)

Parameters:
circleGradCenterX : int
circleGradCenterY : int
circleGradRadius : float32
circleGradInner : Color
circleGradOuter : Color
layer : int<MeasureProduct<RenderLayer, MeasureOne>>

CircleOutline(circleOutCenter, circleOutRadius, circleOutColor, layer)

Full Usage: CircleOutline(circleOutCenter, circleOutRadius, circleOutColor, layer)

Parameters:
circleOutCenter : Vector2
circleOutRadius : float32
circleOutColor : Color
layer : int<MeasureProduct<RenderLayer, MeasureOne>>

CircleSector(sectorCenter, sectorRadius, sectorStartAngle, sectorEndAngle, sectorSegments, sectorColor, layer)

Full Usage: CircleSector(sectorCenter, sectorRadius, sectorStartAngle, sectorEndAngle, sectorSegments, sectorColor, layer)

Parameters:
sectorCenter : Vector2
sectorRadius : float32
sectorStartAngle : float32
sectorEndAngle : float32
sectorSegments : int
sectorColor : Color
layer : int<MeasureProduct<RenderLayer, MeasureOne>>

CircleSectorOutline(sectorOutCenter, sectorOutRadius, sectorOutStartAngle, sectorOutEndAngle, sectorOutSegments, sectorOutColor, layer)

Full Usage: CircleSectorOutline(sectorOutCenter, sectorOutRadius, sectorOutStartAngle, sectorOutEndAngle, sectorOutSegments, sectorOutColor, layer)

Parameters:
sectorOutCenter : Vector2
sectorOutRadius : float32
sectorOutStartAngle : float32
sectorOutEndAngle : float32
sectorOutSegments : int
sectorOutColor : Color
layer : int<MeasureProduct<RenderLayer, MeasureOne>>

Clear(clearColor, layer)

Full Usage: Clear(clearColor, layer)

Parameters:

ClearScissor layer

Full Usage: ClearScissor layer

Parameters:

DisableShadows(lightCtx, layer)

Full Usage: DisableShadows(lightCtx, layer)

Parameters:

DrawImmediate(action, layer)

Full Usage: DrawImmediate(action, layer)

Parameters:
action : unit -> unit
layer : int<MeasureProduct<RenderLayer, MeasureOne>>

EllipseOutline(ellipseOutCenterX, ellipseOutCenterY, ellipseOutRadiusH, ellipseOutRadiusV, ellipseOutColor, layer)

Full Usage: EllipseOutline(ellipseOutCenterX, ellipseOutCenterY, ellipseOutRadiusH, ellipseOutRadiusV, ellipseOutColor, layer)

Parameters:
ellipseOutCenterX : int
ellipseOutCenterY : int
ellipseOutRadiusH : float32
ellipseOutRadiusV : float32
ellipseOutColor : Color
layer : int<MeasureProduct<RenderLayer, MeasureOne>>

EnableShadows(lightCtx, layer)

Full Usage: EnableShadows(lightCtx, layer)

Parameters:

EndCamera layer

Full Usage: EndCamera layer

Parameters:

EndLighting(lightCtx, layer)

Full Usage: EndLighting(lightCtx, layer)

Parameters:

EndShader layer

Full Usage: EndShader layer

Parameters:

EndTarget layer

Full Usage: EndTarget layer

Parameters:

FillCircle(circleCenter, circleRadius, circleColor, layer)

Full Usage: FillCircle(circleCenter, circleRadius, circleColor, layer)

Parameters:
circleCenter : Vector2
circleRadius : float32
circleColor : Color
layer : int<MeasureProduct<RenderLayer, MeasureOne>>

FillEllipse(ellipseCenterX, ellipseCenterY, ellipseRadiusH, ellipseRadiusV, ellipseColor, layer)

Full Usage: FillEllipse(ellipseCenterX, ellipseCenterY, ellipseRadiusH, ellipseRadiusV, ellipseColor, layer)

Parameters:
ellipseCenterX : int
ellipseCenterY : int
ellipseRadiusH : float32
ellipseRadiusV : float32
ellipseColor : Color
layer : int<MeasureProduct<RenderLayer, MeasureOne>>

FillPoly(polyCenter, polySides, polyRadius, polyRotation, polyColor, layer)

Full Usage: FillPoly(polyCenter, polySides, polyRadius, polyRotation, polyColor, layer)

Parameters:
polyCenter : Vector2
polySides : int
polyRadius : float32
polyRotation : float32
polyColor : Color
layer : int<MeasureProduct<RenderLayer, MeasureOne>>

FillRect(fillRect, fillColor, layer)

Full Usage: FillRect(fillRect, fillColor, layer)

Parameters:
fillRect : Rectangle
fillColor : Color
layer : int<MeasureProduct<RenderLayer, MeasureOne>>

FillRectRounded(roundedRect, roundedFillRoundness, roundedFillSegments, roundedFillColor, layer)

Full Usage: FillRectRounded(roundedRect, roundedFillRoundness, roundedFillSegments, roundedFillColor, layer)

Parameters:
roundedRect : Rectangle
roundedFillRoundness : float32
roundedFillSegments : int
roundedFillColor : Color
layer : int<MeasureProduct<RenderLayer, MeasureOne>>

FillRing(ringCenter, ringInnerR, ringOuterR, ringStartAngle, ringEndAngle, ringSegments, ringColor, layer)

Full Usage: FillRing(ringCenter, ringInnerR, ringOuterR, ringStartAngle, ringEndAngle, ringSegments, ringColor, layer)

Parameters:
ringCenter : Vector2
ringInnerR : float32
ringOuterR : float32
ringStartAngle : float32
ringEndAngle : float32
ringSegments : int
ringColor : Color
layer : int<MeasureProduct<RenderLayer, MeasureOne>>

Line(lineStart, lineFinish, lineColor, layer)

Full Usage: Line(lineStart, lineFinish, lineColor, layer)

Parameters:
lineStart : Vector2
lineFinish : Vector2
lineColor : Color
layer : int<MeasureProduct<RenderLayer, MeasureOne>>

LineStrip(stripPoints, stripColor, layer)

Full Usage: LineStrip(stripPoints, stripColor, layer)

Parameters:
stripPoints : Vector2[]
stripColor : Color
layer : int<MeasureProduct<RenderLayer, MeasureOne>>

LineThick(lineThickStart, lineThickFinish, lineThickThickness, lineThickColor, layer)

Full Usage: LineThick(lineThickStart, lineThickFinish, lineThickThickness, lineThickColor, layer)

Parameters:
lineThickStart : Vector2
lineThickFinish : Vector2
lineThickThickness : float32
lineThickColor : Color
layer : int<MeasureProduct<RenderLayer, MeasureOne>>

LitSprite(lightCtx, sprite)

Full Usage: LitSprite(lightCtx, sprite)

Parameters:
lightCtx : LightContext2D
sprite : SpriteState

NoopLight layer

Full Usage: NoopLight layer

Parameters:

Particle(particleTexture, particleData, particleCount, layer)

Full Usage: Particle(particleTexture, particleData, particleCount, layer)

Parameters:
particleTexture : Texture2D
particleData : Particle2D[]
particleCount : int
layer : int<MeasureProduct<RenderLayer, MeasureOne>>

PolyOutline(polyOutCenter, polyOutSides, polyOutRadius, polyOutRotation, polyOutThickness, polyOutColor, layer)

Full Usage: PolyOutline(polyOutCenter, polyOutSides, polyOutRadius, polyOutRotation, polyOutThickness, polyOutColor, layer)

Parameters:
polyOutCenter : Vector2
polyOutSides : int
polyOutRadius : float32
polyOutRotation : float32
polyOutThickness : float32
polyOutColor : Color
layer : int<MeasureProduct<RenderLayer, MeasureOne>>

RectGradient(gradRect, gradTL, gradBL, gradTR, gradBR, layer)

Full Usage: RectGradient(gradRect, gradTL, gradBL, gradTR, gradBR, layer)

Parameters:
gradRect : Rectangle
gradTL : Color
gradBL : Color
gradTR : Color
gradBR : Color
layer : int<MeasureProduct<RenderLayer, MeasureOne>>

RectGradientH(gradHX, gradHY, gradHW, gradHH, gradHLeft, gradHRight, layer)

Full Usage: RectGradientH(gradHX, gradHY, gradHW, gradHH, gradHLeft, gradHRight, layer)

Parameters:
gradHX : int
gradHY : int
gradHW : int
gradHH : int
gradHLeft : Color
gradHRight : Color
layer : int<MeasureProduct<RenderLayer, MeasureOne>>

RectGradientV(gradVX, gradVY, gradVW, gradVH, gradVTop, gradVBottom, layer)

Full Usage: RectGradientV(gradVX, gradVY, gradVW, gradVH, gradVTop, gradVBottom, layer)

Parameters:
gradVX : int
gradVY : int
gradVW : int
gradVH : int
gradVTop : Color
gradVBottom : Color
layer : int<MeasureProduct<RenderLayer, MeasureOne>>

RectOutline(outlineRect, outlineThickness, outlineColor, layer)

Full Usage: RectOutline(outlineRect, outlineThickness, outlineColor, layer)

Parameters:
outlineRect : Rectangle
outlineThickness : float32
outlineColor : Color
layer : int<MeasureProduct<RenderLayer, MeasureOne>>

RectRoundedOutline(roundedOutlineRect, roundedOutlineRoundness, roundedOutlineSegments, roundedOutlineThickness, roundedOutlineColor, layer)

Full Usage: RectRoundedOutline(roundedOutlineRect, roundedOutlineRoundness, roundedOutlineSegments, roundedOutlineThickness, roundedOutlineColor, layer)

Parameters:
roundedOutlineRect : Rectangle
roundedOutlineRoundness : float32
roundedOutlineSegments : int
roundedOutlineThickness : float32
roundedOutlineColor : Color
layer : int<MeasureProduct<RenderLayer, MeasureOne>>

RingOutline(ringOutCenter, ringOutInnerR, ringOutOuterR, ringOutStartAngle, ringOutEndAngle, ringOutSegments, ringOutColor, layer)

Full Usage: RingOutline(ringOutCenter, ringOutInnerR, ringOutOuterR, ringOutStartAngle, ringOutEndAngle, ringOutSegments, ringOutColor, layer)

Parameters:
ringOutCenter : Vector2
ringOutInnerR : float32
ringOutOuterR : float32
ringOutStartAngle : float32
ringOutEndAngle : float32
ringOutSegments : int
ringOutColor : Color
layer : int<MeasureProduct<RenderLayer, MeasureOne>>

SetBlend(blend, layer)

Full Usage: SetBlend(blend, layer)

Parameters:

SetLineWidth(lineWidth, layer)

Full Usage: SetLineWidth(lineWidth, layer)

Parameters:
lineWidth : float32
layer : int<MeasureProduct<RenderLayer, MeasureOne>>

SetScissor(scissorX, scissorY, scissorW, scissorH, layer)

Full Usage: SetScissor(scissorX, scissorY, scissorW, scissorH, layer)

Parameters:
scissorX : int
scissorY : int
scissorW : int
scissorH : int
layer : int<MeasureProduct<RenderLayer, MeasureOne>>

SetViewport(viewportX, viewportY, viewportW, viewportH, layer)

Full Usage: SetViewport(viewportX, viewportY, viewportW, viewportH, layer)

Parameters:
viewportX : int
viewportY : int
viewportW : int
viewportH : int
layer : int<MeasureProduct<RenderLayer, MeasureOne>>

Sprite(spriteTexture, spriteDest, spriteSource, spriteOrigin, spriteRotation, spriteColor, layer)

Full Usage: Sprite(spriteTexture, spriteDest, spriteSource, spriteOrigin, spriteRotation, spriteColor, layer)

Parameters:
spriteTexture : Texture2D
spriteDest : Rectangle
spriteSource : Rectangle
spriteOrigin : Vector2
spriteRotation : float32
spriteColor : Color
layer : int<MeasureProduct<RenderLayer, MeasureOne>>

Text(textFont, textValue, textPosition, textScale, textColor, layer)

Full Usage: Text(textFont, textValue, textPosition, textScale, textColor, layer)

Parameters:
textFont : SpriteFont
textValue : string
textPosition : Vector2
textScale : float32
textColor : Color
layer : int<MeasureProduct<RenderLayer, MeasureOne>>

Triangle(triV1, triV2, triV3, triColor, layer)

Full Usage: Triangle(triV1, triV2, triV3, triColor, layer)

Parameters:
triV1 : Vector2
triV2 : Vector2
triV3 : Vector2
triColor : Color
layer : int<MeasureProduct<RenderLayer, MeasureOne>>

TriangleFan(fanPoints, fanColor, layer)

Full Usage: TriangleFan(fanPoints, fanColor, layer)

Parameters:
fanPoints : Vector2[]
fanColor : Color
layer : int<MeasureProduct<RenderLayer, MeasureOne>>

TriangleStrip(stripTriPoints, stripTriColor, layer)

Full Usage: TriangleStrip(stripTriPoints, stripTriColor, layer)

Parameters:
stripTriPoints : Vector2[]
stripTriColor : Color
layer : int<MeasureProduct<RenderLayer, MeasureOne>>

Instance members

Instance member Description

this.IsBeginCamera

Full Usage: this.IsBeginCamera

Returns: bool
Returns: bool

this.IsBeginCameraConfig

Full Usage: this.IsBeginCameraConfig

Returns: bool
Returns: bool

this.IsBeginShader

Full Usage: this.IsBeginShader

Returns: bool
Returns: bool

this.IsBeginTarget

Full Usage: this.IsBeginTarget

Returns: bool
Returns: bool

this.IsBezier

Full Usage: this.IsBezier

Returns: bool
Returns: bool

this.IsCircleGradient

Full Usage: this.IsCircleGradient

Returns: bool
Returns: bool

this.IsCircleOutline

Full Usage: this.IsCircleOutline

Returns: bool
Returns: bool

this.IsCircleSector

Full Usage: this.IsCircleSector

Returns: bool
Returns: bool

this.IsCircleSectorOutline

Full Usage: this.IsCircleSectorOutline

Returns: bool
Returns: bool

this.IsClear

Full Usage: this.IsClear

Returns: bool
Returns: bool

this.IsClearScissor

Full Usage: this.IsClearScissor

Returns: bool
Returns: bool

this.IsDisableShadows

Full Usage: this.IsDisableShadows

Returns: bool
Returns: bool

this.IsDrawImmediate

Full Usage: this.IsDrawImmediate

Returns: bool
Returns: bool

this.IsEllipseOutline

Full Usage: this.IsEllipseOutline

Returns: bool
Returns: bool

this.IsEnableShadows

Full Usage: this.IsEnableShadows

Returns: bool
Returns: bool

this.IsEndCamera

Full Usage: this.IsEndCamera

Returns: bool
Returns: bool

this.IsEndLighting

Full Usage: this.IsEndLighting

Returns: bool
Returns: bool

this.IsEndShader

Full Usage: this.IsEndShader

Returns: bool
Returns: bool

this.IsEndTarget

Full Usage: this.IsEndTarget

Returns: bool
Returns: bool

this.IsFillCircle

Full Usage: this.IsFillCircle

Returns: bool
Returns: bool

this.IsFillEllipse

Full Usage: this.IsFillEllipse

Returns: bool
Returns: bool

this.IsFillPoly

Full Usage: this.IsFillPoly

Returns: bool
Returns: bool

this.IsFillRect

Full Usage: this.IsFillRect

Returns: bool
Returns: bool

this.IsFillRectRounded

Full Usage: this.IsFillRectRounded

Returns: bool
Returns: bool

this.IsFillRing

Full Usage: this.IsFillRing

Returns: bool
Returns: bool

this.IsLine

Full Usage: this.IsLine

Returns: bool
Returns: bool

this.IsLineStrip

Full Usage: this.IsLineStrip

Returns: bool
Returns: bool

this.IsLineThick

Full Usage: this.IsLineThick

Returns: bool
Returns: bool

this.IsLitSprite

Full Usage: this.IsLitSprite

Returns: bool
Returns: bool

this.IsNoopLight

Full Usage: this.IsNoopLight

Returns: bool
Returns: bool

this.IsParticle

Full Usage: this.IsParticle

Returns: bool
Returns: bool

this.IsPolyOutline

Full Usage: this.IsPolyOutline

Returns: bool
Returns: bool

this.IsRectGradient

Full Usage: this.IsRectGradient

Returns: bool
Returns: bool

this.IsRectGradientH

Full Usage: this.IsRectGradientH

Returns: bool
Returns: bool

this.IsRectGradientV

Full Usage: this.IsRectGradientV

Returns: bool
Returns: bool

this.IsRectOutline

Full Usage: this.IsRectOutline

Returns: bool
Returns: bool

this.IsRectRoundedOutline

Full Usage: this.IsRectRoundedOutline

Returns: bool
Returns: bool

this.IsRingOutline

Full Usage: this.IsRingOutline

Returns: bool
Returns: bool

this.IsSetBlend

Full Usage: this.IsSetBlend

Returns: bool
Returns: bool

this.IsSetLineWidth

Full Usage: this.IsSetLineWidth

Returns: bool
Returns: bool

this.IsSetScissor

Full Usage: this.IsSetScissor

Returns: bool
Returns: bool

this.IsSetViewport

Full Usage: this.IsSetViewport

Returns: bool
Returns: bool

this.IsSprite

Full Usage: this.IsSprite

Returns: bool
Returns: bool

this.IsText

Full Usage: this.IsText

Returns: bool
Returns: bool

this.IsTriangle

Full Usage: this.IsTriangle

Returns: bool
Returns: bool

this.IsTriangleFan

Full Usage: this.IsTriangleFan

Returns: bool
Returns: bool

this.IsTriangleStrip

Full Usage: this.IsTriangleStrip

Returns: bool
Returns: bool

Type something to start searching.