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

Jump to: navigation, search
UE2Runtime Object >> Canvas

Contents

Package: 
Engine
This class in other games:
RTNP, U1, U2, U2XMP, UDK, UT, UT2003, UT2004, 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.

[edit] Properties

[edit] bCenter

Type: bool

Whether to center the text.

[edit] bNoSmooth

Type: bool

Don't bilinear filter.

[edit] ClipX

Type: float


[edit] ClipY

Type: float

Bottom right clipping region.

[edit] CurX

Type: float

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

[edit] CurY

Type: float

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

[edit] CurYL

Type: float

Largest Y size since DrawText.

[edit] DrawColor

Type: Object.Color

Color for drawing.

Default value:

Member Value
A 255
B 127
G 127
R 127

[edit] Font

Type: Font

Font for DrawText.

Default value: Font'Engine.DefaultFont'

[edit] MedFont

Type: Font


[edit] MedFontName

Type: string


Default value: "EM_Fonts_T.FontMono800x600"

[edit] OrgX

Type: float


[edit] OrgY

Type: float

Origin for drawing.

[edit] pCanvasUtil

Type: int

Modifiers: const


[edit] SizeX

Type: int

Modifiers: const

The screen size in X Axis

[edit] SizeY

Type: int

Modifiers: const

The screen size in Y Axis

[edit] SmallFont

Type: Font


[edit] SmallFontName

Type: string


Default value: "EM_Fonts_T.FontMono"

[edit] SpaceX

Type: float


[edit] SpaceY

Type: float

Spacing for after Draw*.

[edit] Style

Type: byte

Drawing style STY_None means don't draw.

Default value: 1

[edit] TinyFont

Type: Font


[edit] TinyFontName

Type: string


Default value: "EM_Fonts_T.FontMono"

[edit] Viewport

Type: Viewport

Modifiers: const

Viewport that owns the canvas.

[edit] Z

Type: float

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

Default value: 1.0

[edit] Functions

[edit] Static functions

[edit] 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

[edit] Native functions

[edit] 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.

[edit] 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)


[edit] DrawText

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

Draw a text.

[edit] DrawTextClipped

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


[edit] DrawTextJustified

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


[edit] DrawTile

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


[edit] DrawTileClipped

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


[edit] DrawTileJustified

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


[edit] DrawTileScaled

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


[edit] DrawTileStretched

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


[edit] StrLen

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


[edit] TextSize

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


[edit] WrapStringToArray

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


[edit] Events

[edit] Reset

event Reset ()

Reset all canvas variables to their defaults

[edit] Other instance functions

[edit] 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.

[edit] DrawBracket

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


[edit] DrawHorizontal

final function DrawHorizontal (float Y, float width)


[edit] DrawIcon

final function DrawIcon (Texture Tex, float Scale)

Draw a scaled image.

[edit] DrawLine

final function DrawLine (int direction, float size)


[edit] DrawPattern

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


[edit] DrawRect

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


[edit] DrawVertical

final function DrawVertical (float X, float height)

Draw a vertical line(Y Axis)

[edit] SetClip

final function SetClip (float X, float Y)


[edit] SetDrawColor

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


[edit] SetOrigin

final function SetOrigin (float X, float Y)


[edit] SetPos

final function SetPos (float X, float Y)


Personal tools