Navigation
API > API/Runtime > API/Runtime/Engine > API/Runtime/Engine/Engine
Inheritance Hierarchy
- UObjectBase
- UObjectBaseUtility
- UObject
- UCanvas
References
Module | Engine |
Header | /Engine/Source/Runtime/Engine/Classes/Engine/Canvas.h |
Include | #include "Engine/Canvas.h" |
Syntax
UCLASS (Transient, BlueprintType, MinimalAPI)
class UCanvas : public UObject
Remarks
A drawing canvas.
Variables
Type | Name | Description | |
---|---|---|---|
![]() ![]() |
uint32: 1 | bCenterX | |
![]() ![]() |
uint32: 1 | bCenterY | |
![]() ![]() |
uint32: 1 | bNoSmooth | |
![]() |
int32 | CachedDisplayHeight | |
![]() |
int32 | CachedDisplayWidth | |
![]() |
FCanvas * | Canvas | |
![]() ![]() |
float | ClipX | |
![]() ![]() |
float | ClipY | |
![]() ![]() |
FPlane | ColorModulate | Internal. |
![]() ![]() |
TObjectPtr< class UTexture2D > | DefaultTexture | |
![]() |
FDisplayDebugManager | DisplayDebugManager | |
![]() ![]() |
FColor | DrawColor | |
![]() ![]() |
TObjectPtr< class UTexture2D > | GradientTexture0 | |
![]() |
FQuat | HmdOrientation | |
![]() ![]() |
float | OrgX | Modifiable properties. |
![]() ![]() |
float | OrgY | |
![]() ![]() |
TObjectPtr< class UReporterGraph > | ReporterGraph | Helper class to render 2d graphs on canvas |
![]() |
int32 | SafeZonePadEX | |
![]() |
int32 | SafeZonePadEY | |
![]() |
int32 | SafeZonePadX | Cached data for safe zone calculation. |
![]() |
int32 | SafeZonePadY | |
![]() |
FSceneView * | SceneView | |
![]() ![]() |
int32 | SizeX | |
![]() ![]() |
int32 | SizeY | |
![]() |
int32 | UnsafeSizeX | |
![]() |
int32 | UnsafeSizeY | |
![]() |
FMatrix | ViewProjectionMatrix |
Constructors
Type | Name | Description | |
---|---|---|---|
![]() |
UCanvas
(
const FObjectInitializer& ObjectInitializer |
Functions
Type | Name | Description | |
---|---|---|---|
![]() |
void | Applies the current Platform's safe zone to the current Canvas position. | |
![]() ![]() |
void | CanvasStringSize
(
FTextSizingParameters& Parameters, |
Calculates the size of the specified string. |
![]() ![]() |
void | ClippedStrLen
(
const UFont* Font, |
Calculate the length of a string. |
![]() |
FFontRenderInfo | CreateFontRenderInfo
(
bool bClipText, |
Constructor for FontRenderInfo |
![]() ![]() |
void | Transforms 2D screen coordinates into a 3D world-space origin and direction. | |
![]() ![]() |
void | DrawDebugGraph
(
const FString& Title, |
Draws a graph comparing 2 variables. Useful for visual debugging and tweaking. |
![]() |
void | DrawIcon
(
FCanvasIcon Icon, |
Draw a CanvasIcon at the desired canvas position. |
![]() |
void | DrawItem
(
FCanvasItem& Item, |
Draw a CanvasItem at the given coordinates |
![]() |
void | DrawItem
(
FCanvasItem& Item, |
Draw a CanvasItem at the given coordinates |
![]() |
void | DrawItem
(
FCanvasItem& Item |
Draw a CanvasItem |
![]() |
void | DrawScaledIcon
(
FCanvasIcon Icon, |
Draw a scaled CanvasIcon at the desired canvas position. |
![]() |
float | DrawText
(
const UFont* InFont, |
|
![]() |
float | DrawText
(
const UFont* InFont, |
Draws a string of text to the screen. |
![]() |
float | DrawText
(
const UFont* InFont, |
|
![]() |
void | DrawTile
(
UTexture* Tex, |
Draw arbitrary aligned rectangle. |
![]() ![]() |
void | GetCenter
(
float& outX, |
Return X,Y for center of the draw region. |
![]() ![]() |
void | GetCenter
(
double& outX, |
|
![]() ![]() |
float | GetDPIScale () |
|
![]() |
TWeakObjectPtr< class UReporterGraph > | Creates if necessary and returns ReporterGraph instance for 2d graph canvas drawing | |
![]() |
void | Init
(
int32 InSizeX, |
Initializes the canvas. |
![]() ![]() ![]() |
void | K2_Deproject
(
FVector2D ScreenPosition, |
Performs a deprojection of a screen space coordinate using the projection matrix set up for the Canvas. |
![]() ![]() ![]() |
void | K2_DrawBorder
(
UTexture* BorderTexture, |
Draws a 3x3 grid border with tiled frame and tiled interior on the Canvas. |
![]() ![]() ![]() |
void | K2_DrawBox
(
FVector2D ScreenPosition, |
Draws an unfilled box on the Canvas. |
![]() ![]() ![]() |
void | K2_DrawLine
(
FVector2D ScreenPositionA, |
Draws a line on the Canvas. |
![]() ![]() ![]() |
void | K2_DrawMaterial
(
UMaterialInterface* RenderMaterial, |
Draws a material on the Canvas. |
![]() ![]() ![]() |
void | K2_DrawMaterialTriangle
(
UMaterialInterface* RenderMaterial, |
Draws a set of triangles on the Canvas. |
![]() ![]() ![]() |
void | K2_DrawPolygon
(
UTexture* RenderTexture, |
Draws a polygon on the Canvas. |
![]() ![]() ![]() |
void | K2_DrawText
(
UFont* RenderFont, |
Draws text on the Canvas. |
![]() ![]() ![]() |
void | K2_DrawTexture
(
UTexture* RenderTexture, |
Draws a texture on the Canvas. |
![]() ![]() ![]() |
void | K2_DrawTriangle
(
UTexture* RenderTexture, |
Draws a set of triangles on the Canvas. |
![]() ![]() ![]() |
FVector | K2_Project
(
FVector WorldLocation |
Performs a projection of a world space coordinates using the projection matrix set up for the Canvas. |
![]() ![]() ![]() |
FVector2D | Returns the wrapped text size in screen space coordinates. | |
![]() |
FVector2D | K2_TextSize
(
UFont* RenderFont, |
Returns the clipped text size in screen space coordinates. |
![]() ![]() |
FCanvasIcon | Fake CanvasIcon constructor. | |
![]() ![]() |
void | MeasureStringInternal
(
FTextSizingParameters& Parameters, |
|
![]() ![]() |
void | MeasureStringInternal
(
FTextSizingParameters& Parameters, |
Measures a string, optionally stopped after the specified horizontal offset in pixels is reached. |
![]() |
void | ||
![]() ![]() |
FVector | Transforms a 3D world-space vector into 2D screen coordinates. | |
![]() ![]() |
void | Reset
(
bool bKeepOrigin |
Reset canvas parameters, optionally do not change the origin |
![]() |
void | SetClip
(
float X, |
Sets the position of the lower-left corner of the clipping region of the Canvas |
![]() |
void | SetDrawColor
(
uint8 R, |
Set draw color. (R,G,B,A) |
![]() |
void | SetDrawColor
(
FColor const& C |
Set draw color. (FColor) |
![]() |
void | SetLinearDrawColor
(
FLinearColor InColor, |
Set DrawColor with a FLinearColor and optional opacity override |
![]() |
void | SetView
(
FSceneView* InView |
Changes the view for the canvas. |
![]() |
void | StrLen
(
const UFont* InFont, |
|
![]() |
void | StrLen
(
const UFont* InFont, |
Calculate the length of a string, taking text wrapping into account. |
![]() |
void | StrLen
(
const UFont* InFont, |
|
![]() |
void | StrLen
(
const UFont* InFont, |
|
![]() ![]() |
void | StrLen
(
const UFont* InFont, |
Calculate the length of a string, taking text wrapping into account. |
![]() ![]() |
void | StrLen
(
const UFont* InFont, |
|
![]() ![]() |
void | StrLen
(
const UFont* InFont, |
|
![]() ![]() |
void | StrLen
(
const UFont* InFont, |
|
![]() |
void | TextSize
(
const UFont* InFont, |
|
![]() |
void | TextSize
(
const UFont* InFont, |
|
![]() |
void | TextSize
(
const UFont* InFont, |
Calculates the horizontal and vertical size of a given string. |
![]() |
void | TextSize
(
const UFont* InFont, |
|
![]() |
void | Update () |
Updates the canvas. |
![]() ![]() |
void | Function to go through all constructed canvas items and update their safe zone data. | |
![]() |
void | Updates cached SafeZone data from the device. Call when main device is resized. | |
![]() |
int32 | WrappedPrint
(
bool Draw, |
Compute size and optionally print text with word wrap. |
![]() |
void | WrappedStrLenf
(
const UFont* Font, |
Calculate the size of a string built from a font, word wrapped to a specified region. |
![]() |
void | WrapString
(
FTextSizingParameters& Parameters, |
|
![]() ![]() |
void | WrapString
(
FCanvasWordWrapper& Wrapper, |
Parses a single string into an array of strings that will fit inside the specified bounding region. |
Overridden from UObject
Type | Name | Description | |
---|---|---|---|
![]() ![]() |
void | BeginDestroy () |
Called before destroying the object. |
Enums
Type | Name | Description | |
---|---|---|---|
![]() |
ELastCharacterIndexFormat |