The three virtues of a programmer: Laziness, Impatience, and Hubris. – Larry Wall

UE2:Canvas (UT2003)

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
UT2003 Object >> Canvas
Package: 
Engine
This class in other games:
RTNP, U1, UT, U2, U2XMP, UE2Runtime, 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.

bRenderLevel[edit]

Type: bool


Default value: True

ClipX[edit]

Type: float


ClipY[edit]

Type: float

Bottom right clipping region.

ColorModulate[edit]

Type: Object.Plane

sjs - Modulate all colors by this before rendering

Default value:

Member Value
W 1.0
X 1.0
Y 1.0
Z 1.0

CurX[edit]

Type: float


CurY[edit]

Type: float

Current position for drawing.

CurYL[edit]

Type: float

Largest Y size since DrawText.

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.

Default value: DefaultFont

FontScaleX[edit]

Type: float


Default value: 1.0

FontScaleY[edit]

Type: float

Scale for DrawText & DrawTextClipped. // gam

Default value: 1.0

MedFont[edit]

Type: Font


MedFontName[edit]

Type: string


Default value: "UT2003Fonts.FontMono800x600"

OrgX[edit]

Type: float


OrgY[edit]

Type: float

Origin for drawing.

pCanvasUtil[edit]

Type: pointer

Modifiers: const


Default value: 0

SizeX[edit]

Type: int

Modifiers: const


SizeY[edit]

Type: int

Modifiers: const

Zero-based actual dimensions.

SmallFont[edit]

Type: Font


SmallFontName[edit]

Type: string


Default value: "UT2003Fonts.FontMono"

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

TinyFont[edit]

Type: Font


TinyFontName[edit]

Type: string


Default value: "UT2003Fonts.FontMono"

Viewport[edit]

Type: Viewport

Modifiers: const

Viewport that owns the canvas.

Z[edit]

Type: float

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

Default value: 1.0

Functions[edit]

Static native functions[edit]

WrapText[edit]

static native final function WrapText (out string Text, out string Line, float dx, Font F, float FontScaleX)


Other static functions[edit]

MakeColor[edit]

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


Native functions[edit]

Clear[edit]

native final function Clear (optional bool ClearRGB, optional bool ClearZ)


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)


DrawScreenActor[edit]

native final function DrawScreenActor (Actor A, optional float FOV, optional bool WireFrame, optional bool ClearZ)


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)


DrawTextJustified[edit]

native final function DrawTextJustified (coerce string String, byte Justification, float x1, float y1, float x2, float y2)


DrawTile[edit]

native(466) final function DrawTile (Material Mat, float XL, float YL, float U, float V, float UL, float VL)


DrawTileClipped[edit]

native(468) final function DrawTileClipped (Material Mat, float XL, float YL, float U, float V, float UL, float VL)


DrawTileJustified[edit]

native final function DrawTileJustified (Material Mat, byte Justification, float XL, float YL)


DrawTileScaled[edit]

native final function DrawTileScaled (Material Mat, float XScale, float YScale)


DrawTileStretched[edit]

native final function DrawTileStretched (Material Mat, float XL, float YL)


GetCameraLocation[edit]

native final function GetCameraLocation (out Object.Vector CameraLocation, out Object.Rotator CameraRotation)


SetScreenLight[edit]

native final function SetScreenLight (int index, Object.Vector Position, Object.Color lightcolor, float radius)


SetScreenProjector[edit]

native final function SetScreenProjector (int index, Object.Vector Position, Object.Color color, float radius, Texture tex)


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)


WorldToScreen[edit]

native final function Object.Vector WorldToScreen (Object.Vector WorldLoc)


WrapStringToArray[edit]

native final function WrapStringToArray (string Text, out array<stringOutArray, float dx, string EOL)


Events[edit]

Reset[edit]

event Reset ()


Other instance functions[edit]

DrawBox[edit]

final simulated function DrawBox (Canvas canvas, float width, float height)


DrawBracket[edit]

final simulated function DrawBracket (float width, float height, float bracket_size)


DrawHorizontal[edit]

final function DrawHorizontal (float Y, float width)


DrawIcon[edit]

final function DrawIcon (Texture Tex, float Scale)


DrawLine[edit]

final function DrawLine (int direction, float size)


DrawPattern[edit]

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


DrawRect[edit]

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


DrawScreenText[edit]

simulated function DrawScreenText (string Text, float X, float Y, Object.EDrawPivot Pivot)


DrawVertical[edit]

final function DrawVertical (float X, float height)


SetClip[edit]

final function SetClip (float X, float Y)


SetDrawColor[edit]

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


SetOrigin[edit]

final function SetOrigin (float X, float Y)


SetPos[edit]

final function SetPos (float X, float Y)