There is no spoon
UE3:Canvas (UDK)
Object >> Canvas |
Contents
- 1 Properties
- 2 Structs
- 3 Functions
- 3.1 Static functions
- 3.2 Native functions
- 3.2.1 DeProject
- 3.2.2 Draw2DLine
- 3.2.3 DrawColorizedTile
- 3.2.4 DrawMaterialTile
- 3.2.5 DrawMaterialTileClipped
- 3.2.6 DrawRotatedMaterialTile
- 3.2.7 DrawRotatedTile
- 3.2.8 DrawText
- 3.2.9 DrawTextureDoubleLine
- 3.2.10 DrawTextureLine
- 3.2.11 DrawTile
- 3.2.12 DrawTileClipped
- 3.2.13 DrawTileStretched
- 3.2.14 PopTransform
- 3.2.15 Project
- 3.2.16 PushTranslationMatrix
- 3.2.17 SetDrawColor
- 3.2.18 SetPos
- 3.2.19 StrLen
- 3.2.20 TextSize
- 3.3 Events
- 3.4 Other instance functions
Please help improve this article or section by expanding it. |
Canvas: A drawing canvas.
Properties[edit]
bCenter[edit]
Type: bool
Whether to center the text.
bNoSmooth[edit]
Type: bool
Don't bilinear filter.
Canvas[edit]
Type: pointer{FCanvas}
Modifiers: native, const
ClipX[edit]
Type: float
ClipY[edit]
Type: float
Bottom right clipping region.
ColorModulate[edit]
Type: Object.Plane
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.
DefaultTexture[edit]
Type: Texture2D
Default value: Texture2D'EngineResources.WhiteSquareTexture'
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: Font'EngineFonts.SmallFont'
OrgX[edit]
Type: float
OrgY[edit]
Type: float
Origin for drawing.
SceneView[edit]
Type: pointer{FSceneView}
Modifiers: native, const
SizeX[edit]
Type: int
Modifiers: const
SizeY[edit]
Type: int
Modifiers: const
Structs[edit]
CanvasIcon[edit]
Modifiers: native
Holds texture information with UV coordinates as well.
- Texture Texture
- Source texture
- float U
- UV coords
- float V
- UV coords
- float UL
- UV coords
- float VL
- UV coords
DepthFieldGlowInfo[edit]
Modifiers: native
info for glow when using depth field rendering
- bool bEnableGlow
- whether to turn on the outline glow (depth field fonts only)
- Object.LinearColor GlowColor
- base color to use for the glow
- Object.Vector2D GlowOuterRadius
- if bEnableGlow, outline glow outer radius (0 to 1, 0.5 is edge of character silhouette)
glow influence will be 0 at GlowOuterRadius.X and 1 at GlowOuterRadius.Y
- Object.Vector2D GlowInnerRadius
- if bEnableGlow, outline glow inner radius (0 to 1, 0.5 is edge of character silhouette)
glow influence will be 1 at GlowInnerRadius.X and 0 at GlowInnerRadius.Y
FontRenderInfo[edit]
Modifiers: native
information used in font rendering
- bool bClipText
- whether to clip text
- bool bEnableShadow
- whether to turn on shadowing
- DepthFieldGlowInfo GlowInfo
- depth field glow parameters (only usable if font was imported with a depth field)
Functions[edit]
Static functions[edit]
CreateFontRenderInfo[edit]
constructor for FontRenderInfo
Native functions[edit]
DeProject[edit]
transforms 2D screen coordinates into a 3D world-space origin and direction
Parameters:
- ScreenPos - screen coordinates in pixels
- WorldOrigin - out) - world-space origin vector
- WorldDirection - out) - world-space direction vector
Draw2DLine[edit]
DrawColorizedTile[edit]
DrawMaterialTile[edit]
Draws the emissive channel of a material to an axis-aligned quad at CurX,CurY.
Parameters:
- Mat - The material which contains the emissive expression to render.
- XL - The width of the quad in pixels.
- YL - The height of the quad in pixels.
- U - The U coordinate of the quad's upper left corner, in normalized coordinates.
- V - The V coordinate of the quad's upper left corner, in normalized coordinates.
- UL - The range of U coordinates which is mapped to the quad.
- VL - The range of V coordinates which is mapped to the quad.
DrawMaterialTileClipped[edit]
DrawRotatedMaterialTile[edit]
DrawRotatedTile[edit]
DrawText[edit]
DrawTextureDoubleLine[edit]
DrawTextureLine[edit]
DrawTile[edit]
DrawTileClipped[edit]
DrawTileStretched[edit]
PopTransform[edit]
Pops the topmost matrix from the canvas transform stack.
Project[edit]
Convert a 3D vector to a 2D screen coords.
PushTranslationMatrix[edit]
Pushes a translation matrix onto the canvas.
Parameters:
- TranslationVector - Translation vector to use to create the translation matrix.
SetDrawColor[edit]
SetPos[edit]
StrLen[edit]
TextSize[edit]
Events[edit]
Reset[edit]
Other instance functions[edit]
DrawBox[edit]
DrawDebugGraph[edit]
Draws a graph comparing 2 variables. Useful for visual debugging and tweaking.
Parameters:
- Title - Label to draw on the graph, or "" for none
- ValueX - X-axis value of the point to plot
- ValueY - Y-axis value of the point to plot
- UL_X - X screen coord of the upper-left corner of the graph
- UL_Y - Y screen coord of the upper-left corner of the graph
- W - Width of the graph, in pixels
- H - Height of the graph, in pixels
- RangeX - Range of values expressed by the X axis of the graph
- RangeY - Range of values expressed by the Y axis of the graph
DrawIcon[edit]
Draw a CanvasIcon at the desired canvas position.
DrawIconSection[edit]
Draw a subsection of a CanvasIcon at the desired canvas position.
DrawRect[edit]
DrawTextCentered[edit]
DrawTextRA[edit]
Draws text right aligned from the current position.
DrawTexture[edit]
MakeIcon[edit]
Fake CanvasIcon constructor.