I love the smell of UnrealEd crashing in the morning. – tarquin

UE2:Canvas (U2XMP)

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
U2XMP Object >> Canvas
Package: 
Engine
This class in other games:
RTNP, U1, UT, UE2Runtime, U2, UT2003, UT2004, UDK, UT3

Canvas: A drawing canvas. This is a built-in Unreal class and it shouldn't be modified.

Notes. To determine size of a drawable object, set Style to STY_None, remember CurX, draw the thing, then inspect CurX and CurYL.

Properties[edit]

bCenter[edit]

Type: bool

Whether to center the text.

bNoSmooth[edit]

Type: bool

Don't bilinear filter.

ClipX[edit]

Type: float


ClipY[edit]

Type: float

Bottom right clipping region.

CurX[edit]

Type: float


CurY[edit]

Type: float

Current position for drawing.

CurYL[edit]

Type: float

Largest Y size since DrawText.

DebugFont[edit]

Type: Font


Default value: Font'Engine.DebugFont'

DrawColor[edit]

Type: Object.Color

Color for drawing.

Default value:

Member Value
A 255
B 127
G 127
R 127

Font[edit]

Type: Font

Font for DrawText.

MedFont[edit]

Type: Font

Medium system font.

Default value: Font'Engine.MediumFont'

OrgX[edit]

Type: float


OrgY[edit]

Type: float

Origin for drawing.

SizeX[edit]

Type: int

Modifiers: const


SizeY[edit]

Type: int

Modifiers: const


SmallFont[edit]

Type: Font

Small system font.

Default value: Font'Engine.SmallFont'

SpaceX[edit]

Type: float


SpaceY[edit]

Type: float

Spacing for after Draw*.

Style[edit]

Type: byte

Drawing style STY_None means don't draw.

Default value: 1

Viewport[edit]

Type: Viewport

Modifiers: const


Z[edit]

Type: float

Z location. 1=no screenflash, 2=yes screenflash.

Default value: 1.0

Functions[edit]

Static functions[edit]

MakeColor[edit]

static final function Object.Color MakeColor (byte R, byte G, byte B, optional byte A)


Native functions[edit]

DeProject[edit]

native final function Object.Vector DeProject (Object.Vector V)


DrawActor[edit]

native(467) final function DrawActor (Actor A, bool WireFrame, optional bool ClearZ, optional float DisplayFOV)


DrawPortal[edit]

native(480) final function DrawPortal (int X, int Y, int Width, int Height, Actor CamActor, Object.Vector CamLocation, Object.Rotator CamRotation, optional int FOV, optional bool ClearZ)


DrawRectangle[edit]

native final function DrawRectangle (int X, int Y, int Width, int Height, optional Object.Color C)


DrawText[edit]

native(465) final function DrawText (coerce string Text, optional bool CR)


DrawTextClipped[edit]

native(469) final function DrawTextClipped (coerce string Text, optional bool bCheckHotKey)


DrawTile[edit]

native(466) final function DrawTile (Texture Tex, float XL, float YL, float U, float V, float UL, float VL)


DrawTileClipped[edit]

native(468) final function DrawTileClipped (Texture Tex, float XL, float YL, float U, float V, float UL, float VL)


GetDrawBounds[edit]

native final function GetDrawBounds (out int X, out int Y, out int Width, out int Height)


Project[edit]

native final function Object.Vector Project (Object.Vector V)


SetDrawBounds[edit]

native final function SetDrawBounds (int X, int Y, int Width, int Height)


StrLen[edit]

native(464) final function StrLen (coerce string String, out float XL, out float YL)


TextSize[edit]

native(470) final function TextSize (coerce string String, out float XL, out float YL)


Events[edit]

Reset[edit]

event Reset ()


Other instance functions[edit]

DrawIcon[edit]

final function DrawIcon (Texture Tex, float Scale)


DrawPattern[edit]

final function DrawPattern (Texture Tex, float XL, float YL, float Scale)


DrawRect[edit]

final function DrawRect (Texture Tex, float RectX, float RectY)


SetClip[edit]

final function SetClip (float X, float Y)


SetDrawColor[edit]

final function SetDrawColor (byte R, byte G, byte B, optional byte A)


SetFont[edit]

function SetFont (Font NewFont, optional bool bForce)


SetOrigin[edit]

final function SetOrigin (float X, float Y)


SetPos[edit]

final function SetPos (float X, float Y)