I search for solutions in this order: Past Code, Unreal Source, Wiki, BUF, groups.yahoo, google, screaming at monitor. – RegularX

UE2:Canvas (UT2003)

From Unreal Wiki, The Unreal Engine Documentation Site

Jump to: navigation, search
UT2003 Object >> Canvas

Contents

Package: 
Engine
This class in other games:
RTNP, U1, U2, U2XMP, UDK, UE2Runtime, UT, 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] bRenderLevel

Type: bool


Default value: True

[edit] ClipX

Type: float


[edit] ClipY

Type: float

Bottom right clipping region.

[edit] ColorModulate

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

[edit] CurX

Type: float


[edit] CurY

Type: float

Current position for drawing.

[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: DefaultFont

[edit] FontScaleX

Type: float


Default value: 1.0

[edit] FontScaleY

Type: float

Scale for DrawText & DrawTextClipped. // gam

Default value: 1.0

[edit] MedFont

Type: Font


[edit] MedFontName

Type: string


Default value: "UT2003Fonts.FontMono800x600"

[edit] OrgX

Type: float


[edit] OrgY

Type: float

Origin for drawing.

[edit] pCanvasUtil

Type: pointer

Modifiers: const


Default value: 0

[edit] SizeX

Type: int

Modifiers: const


[edit] SizeY

Type: int

Modifiers: const

Zero-based actual dimensions.

[edit] SmallFont

Type: Font


[edit] SmallFontName

Type: string


Default value: "UT2003Fonts.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: "UT2003Fonts.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 native functions

[edit] WrapText

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


[edit] Other static functions

[edit] MakeColor

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


[edit] Native functions

[edit] Clear

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


[edit] DrawActor

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


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

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


[edit] DrawText

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


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

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


[edit] SetScreenLight

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


[edit] SetScreenProjector

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


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

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


[edit] WrapStringToArray

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


[edit] Events

[edit] Reset

event Reset ()


[edit] Other instance functions

[edit] DrawBox

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


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


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

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


[edit] DrawVertical

final function DrawVertical (float X, float height)


[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