Worst-case scenario: the UEd Goblin wipes the map and burns down your house.

UE2:Canvas (UE2Runtime)

From Unreal Wiki, The Unreal Engine Documentation Site
Revision as of 07:02, 11 February 2010 by Hanz (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
UE2Runtime Object >> Canvas
Package: 
Engine
This class in other games:
RTNP, U1, UT, U2XMP, 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

bCenter

Type: bool

Whether to center the text.

bNoSmooth

Type: bool

Don't bilinear filter.

ClipX

Type: float


ClipY

Type: float

Bottom right clipping region.

CurX

Type: float

The canvas current drawing position in the X Axis (Left to Right)

CurY

Type: float

The canvas current drawing position in the Y Axis (Top to Bottom)

CurYL

Type: float

Largest Y size since DrawText.

DrawColor

Type: Object.Color

Color for drawing.

Default value:

Member Value
A 255
B 127
G 127
R 127

Font

Type: Font

Font for DrawText.

Default value: Font'Engine.DefaultFont'

MedFont

Type: Font


MedFontName

Type: string


Default value: "EM_Fonts_T.FontMono800x600"

OrgX

Type: float


OrgY

Type: float

Origin for drawing.

pCanvasUtil

Type: int

Modifiers: const


SizeX

Type: int

Modifiers: const

The screen size in X Axis

SizeY

Type: int

Modifiers: const

The screen size in Y Axis

SmallFont

Type: Font


SmallFontName

Type: string


Default value: "EM_Fonts_T.FontMono"

SpaceX

Type: float


SpaceY

Type: float

Spacing for after Draw*.

Style

Type: byte

Drawing style STY_None means don't draw.

Default value: 1

TinyFont

Type: Font


TinyFontName

Type: string


Default value: "EM_Fonts_T.FontMono"

Viewport

Type: Viewport

Modifiers: const

Viewport that owns the canvas.

Z

Type: float

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

Default value: 1.0

Functions

Static functions

MakeColor

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

Make a color with the input Red, Green and Blue levels

Native functions

DrawActor

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

Draw the the input actor with the other parameters. if WireFrame=True, the actor will be draw normaly but with another wireframe model around it. if ClearZ=True, the actor will be draw in front of everything. DisplayFOV is the FOV Angle of drawing.

DrawPortal

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)


DrawText

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

Draw a text.

DrawTextClipped

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


DrawTextJustified

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


DrawTile

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


DrawTileClipped

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


DrawTileJustified

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


DrawTileScaled

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


DrawTileStretched

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


StrLen

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


TextSize

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


WrapStringToArray

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


Events

Reset

event Reset ()

Reset all canvas variables to their defaults

Other instance functions

DrawBox

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

Draw a box. width is the box size in the X Axis and height is the size in Y Axis.

DrawBracket

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


DrawHorizontal

final function DrawHorizontal (float Y, float width)


DrawIcon

final function DrawIcon (Texture Tex, float Scale)

Draw a scaled image.

DrawLine

final function DrawLine (int direction, float size)


DrawPattern

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


DrawRect

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


DrawVertical

final function DrawVertical (float X, float height)

Draw a vertical line(Y Axis)

SetClip

final function SetClip (float X, float Y)


SetDrawColor

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


SetOrigin

final function SetOrigin (float X, float Y)


SetPos

final function SetPos (float X, float Y)