G1R AngelScript
Scripting reference for the Gothic 1 Remake
Loading...
Searching...
No Matches
UCanvas Class Reference

A drawing canvas. More...

Public Member Functions

Canvas
void DrawText (UFont RenderFont, FString RenderText, FVector2D ScreenPosition, FVector2D Scale=FVector2D(1.000000, 1.000000), FLinearColor RenderColor=FLinearColor(1.000000, 1.000000, 1.000000, 1.000000), float32 Kerning=0.000000, FLinearColor ShadowColor=FLinearColor(0.000000, 0.000000, 0.000000, 1.000000), FVector2D ShadowOffset=FVector2D(1.000000, 1.000000), bool bCentreX=false, bool bCentreY=false, bool bOutlined=false, FLinearColor OutlineColor=FLinearColor(0.000000, 0.000000, 0.000000, 1.000000))
 Draws text on the Canvas.
void DrawBorder (UTexture BorderTexture, UTexture BackgroundTexture, UTexture LeftBorderTexture, UTexture RightBorderTexture, UTexture TopBorderTexture, UTexture BottomBorderTexture, FVector2D ScreenPosition, FVector2D ScreenSize, FVector2D CoordinatePosition, FVector2D CoordinateSize=FVector2D(1.000000, 1.000000), FLinearColor RenderColor=FLinearColor(1.000000, 1.000000, 1.000000, 1.000000), FVector2D BorderScale=FVector2D(0.100000, 0.100000), FVector2D BackgroundScale=FVector2D(0.100000, 0.100000), float32 Rotation=0.000000, FVector2D PivotPoint=FVector2D(0.500000, 0.500000), FVector2D CornerSize=FVector2D())
 Draws a 3x3 grid border with tiled frame and tiled interior on the Canvas.
void DrawBox (FVector2D ScreenPosition, FVector2D ScreenSize, float32 Thickness=1.000000, FLinearColor RenderColor=FLinearColor(1.000000, 1.000000, 1.000000, 1.000000))
 Draws an unfilled box on the Canvas.
void DrawLine (FVector2D ScreenPositionA=FVector2D(), FVector2D ScreenPositionB=FVector2D(), float32 Thickness=1.000000, FLinearColor RenderColor=FLinearColor(1.000000, 1.000000, 1.000000, 1.000000))
 Draws a line on the Canvas.
void DrawMaterial (UMaterialInterface RenderMaterial, FVector2D ScreenPosition, FVector2D ScreenSize, FVector2D CoordinatePosition, FVector2D CoordinateSize=FVector2D(1.000000, 1.000000), float32 Rotation=0.000000, FVector2D PivotPoint=FVector2D(0.500000, 0.500000))
 Draws a material on the Canvas.
void DrawMaterialTriangles (UMaterialInterface RenderMaterial, TArray< FCanvasUVTri > Triangles)
 Draws a set of triangles on the Canvas.
void DrawPolygon (UTexture RenderTexture, FVector2D ScreenPosition, FVector2D Radius=FVector2D(1.000000, 1.000000), int NumberOfSides=3, FLinearColor RenderColor=FLinearColor(1.000000, 1.000000, 1.000000, 1.000000))
 Draws a polygon on the Canvas.
void Deproject (FVector2D ScreenPosition, FVector &WorldOrigin, FVector &WorldDirection)
 Performs a deprojection of a screen space coordinate using the projection matrix set up for the Canvas.
void DrawTexture (UTexture RenderTexture, FVector2D ScreenPosition, FVector2D ScreenSize, FVector2D CoordinatePosition, FVector2D CoordinateSize=FVector2D(1.000000, 1.000000), FLinearColor RenderColor=FLinearColor(1.000000, 1.000000, 1.000000, 1.000000), EBlendMode BlendMode=EBlendMode ::BLEND_Translucent, float32 Rotation=0.000000, FVector2D PivotPoint=FVector2D(0.500000, 0.500000))
 Draws a texture on the Canvas.
void DrawTriangles (UTexture RenderTexture, TArray< FCanvasUVTri > Triangles)
 Draws a set of triangles on the Canvas.
FVector Project (FVector WorldLocation)
 Performs a projection of a world space coordinates using the projection matrix set up for the Canvas.
FVector2D WrappedTextSize (UFont RenderFont, FString RenderText)
 Returns the wrapped text size in screen space coordinates.
FVector2D ClippedTextSize (UFont RenderFont, FString RenderText, FVector2D Scale=FVector2D(1.000000, 1.000000))
 Returns the clipped text size in screen space coordinates.
Public Member Functions inherited from UObject
bool MarkPackageDirty () const
void RemoveFromRoot ()
bool GetIsRooted () const
bool IsTransient () const
bool Modify (bool bAlwaysMarkDirty=true)
void SetTransactional (bool bTransactional)
bool IsSupportedForNetworking () const
UClass GetClass () const
UObject GetOuter () const
UObject GetTypedOuter (TSubclassOf< UObject > Target) const
 Traverses the outer chain searching for the next object of a certain type.
UPackage GetOutermost () const
UPackage GetPackage () const
void AddToRoot ()
UWorld GetWorld () const
FName GetName () const
FString GetFullName (const UObject StopOuter=nullptr) const
FString GetPathName (const UObject StopOuter=nullptr) const
bool IsA (const UClass Class) const
 Returns true if this object is of the specified type, or a child of that type.
void SaveConfig ()
void LoadConfig ()
void ReloadConfig ()
void CopyScriptPropertiesFrom (const UObject OtherObject)
void opCast (?&Address) const
FString ToString () const

Static Public Member Functions

Static Functions
static UClass StaticClass ()
Static Public Member Functions inherited from UObject
static UClass StaticClass ()

Additional Inherited Members

Public Attributes inherited from UObject
const UClass Class
const UObject Outer
const UPackage Outermost
const UPackage Package
const UWorld World
const FName Name
const bool IsRooted

Detailed Description

A drawing canvas.

Member Function Documentation

◆ ClippedTextSize()

FVector2D ClippedTextSize ( UFont RenderFont,
FString RenderText,
FVector2D Scale = FVector2D ( 1.000000 , 1.000000 ) )

Returns the clipped text size in screen space coordinates.

Parameters
RenderFontFont to use when determining the size of the text. If this is null, then a default engine font is used.
RenderTextText to determine the size of.
ScaleScale of the font to use when determining the size of the text.
Returns
Returns the screen space size of the text.

◆ Deproject()

void Deproject ( FVector2D ScreenPosition,
FVector & WorldOrigin,
FVector & WorldDirection )

Performs a deprojection of a screen space coordinate using the projection matrix set up for the Canvas.

Parameters
ScreenPositionScreen space position to deproject to the World.
WorldOriginVector which is the world position of the screen space position.
WorldDirectionVector which can be used in a trace to determine what is "behind" the screen space position. Useful for object picking.

◆ DrawBorder()

void DrawBorder ( UTexture BorderTexture,
UTexture BackgroundTexture,
UTexture LeftBorderTexture,
UTexture RightBorderTexture,
UTexture TopBorderTexture,
UTexture BottomBorderTexture,
FVector2D ScreenPosition,
FVector2D ScreenSize,
FVector2D CoordinatePosition,
FVector2D CoordinateSize = FVector2D ( 1.000000 , 1.000000 ),
FLinearColor RenderColor = FLinearColor ( 1.000000 , 1.000000 , 1.000000 , 1.000000 ),
FVector2D BorderScale = FVector2D ( 0.100000 , 0.100000 ),
FVector2D BackgroundScale = FVector2D ( 0.100000 , 0.100000 ),
float32 Rotation = 0.000000,
FVector2D PivotPoint = FVector2D ( 0.500000 , 0.500000 ),
FVector2D CornerSize = FVector2D ( ) )

Draws a 3x3 grid border with tiled frame and tiled interior on the Canvas.

Parameters
BorderTextureTexture to use for border.
BackgroundTextureTexture to use for border background.
LeftBorderTextureTexture to use for the tiling left border.
RightBorderTextureTexture to use for the tiling right border.
TopBorderTextureTexture to use for the tiling top border.
BottomBorderTextureTexture to use for the tiling bottom border.
ScreenPositionScreen space position to render the texture.
ScreenSizeScreen space size to render the texture.
CoordinatePositionNormalized UV starting coordinate to use when rendering the border texture.
CoordinateSizeNormalized UV size coordinate to use when rendering the border texture.
RenderColorColor to tint the border.
BorderScaleScale of the border.
BackgroundScaleScale of the background.
RotationRotation, in degrees, to render the texture.
PivotPointNormalized pivot point to use when rotating the texture.
CornerSizeFrame corner size in percent of frame texture (should be < 0.5f).

◆ DrawBox()

void DrawBox ( FVector2D ScreenPosition,
FVector2D ScreenSize,
float32 Thickness = 1.000000,
FLinearColor RenderColor = FLinearColor ( 1.000000 , 1.000000 , 1.000000 , 1.000000 ) )

Draws an unfilled box on the Canvas.

Parameters
ScreenPositionScreen space position to render the text.
ScreenSizeScreen space size to render the texture.
ThicknessHow many pixels thick the box lines should be.

◆ DrawLine()

void DrawLine ( FVector2D ScreenPositionA = FVector2D ( ),
FVector2D ScreenPositionB = FVector2D ( ),
float32 Thickness = 1.000000,
FLinearColor RenderColor = FLinearColor ( 1.000000 , 1.000000 , 1.000000 , 1.000000 ) )

Draws a line on the Canvas.

Parameters
ScreenPositionAStarting position of the line in screen space.
ScreenPositionBEnding position of the line in screen space.
ThicknessHow many pixels thick this line should be.
RenderColorColor to render the line.

◆ DrawMaterial()

void DrawMaterial ( UMaterialInterface RenderMaterial,
FVector2D ScreenPosition,
FVector2D ScreenSize,
FVector2D CoordinatePosition,
FVector2D CoordinateSize = FVector2D ( 1.000000 , 1.000000 ),
float32 Rotation = 0.000000,
FVector2D PivotPoint = FVector2D ( 0.500000 , 0.500000 ) )

Draws a material on the Canvas.

Parameters
RenderMaterialMaterial to use when rendering. Remember that only the emissive channel is able to be rendered as no lighting is performed when rendering to the Canvas.
ScreenPositionScreen space position to render the texture.
ScreenSizeScreen space size to render the texture.
CoordinatePositionNormalized UV starting coordinate to use when rendering the texture.
CoordinateSizeNormalized UV size coordinate to use when rendering the texture.
RotationRotation, in degrees, to render the texture.
PivotPointNormalized pivot point to use when rotating the texture.

◆ DrawMaterialTriangles()

void DrawMaterialTriangles ( UMaterialInterface RenderMaterial,
TArray< FCanvasUVTri > Triangles )

Draws a set of triangles on the Canvas.

Parameters
RenderMaterialMaterial to use when rendering. Remember that only the emissive channel is able to be rendered as no lighting is performed when rendering to the Canvas.
TrianglesTriangles to render.

◆ DrawPolygon()

void DrawPolygon ( UTexture RenderTexture,
FVector2D ScreenPosition,
FVector2D Radius = FVector2D ( 1.000000 , 1.000000 ),
int NumberOfSides = 3,
FLinearColor RenderColor = FLinearColor ( 1.000000 , 1.000000 , 1.000000 , 1.000000 ) )

Draws a polygon on the Canvas.

Parameters
RenderTextureTexture to use when rendering the triangles. If no texture is set, then the default white texture is used.
ScreenPositionScreen space position to render the text.
RadiusHow large in pixels this polygon should be.
NumberOfSidesHow many sides this polygon should have. This should be above or equal to three.
RenderColorColor to tint the polygon.

◆ DrawText()

void DrawText ( UFont RenderFont,
FString RenderText,
FVector2D ScreenPosition,
FVector2D Scale = FVector2D ( 1.000000 , 1.000000 ),
FLinearColor RenderColor = FLinearColor ( 1.000000 , 1.000000 , 1.000000 , 1.000000 ),
float32 Kerning = 0.000000,
FLinearColor ShadowColor = FLinearColor ( 0.000000 , 0.000000 , 0.000000 , 1.000000 ),
FVector2D ShadowOffset = FVector2D ( 1.000000 , 1.000000 ),
bool bCentreX = false,
bool bCentreY = false,
bool bOutlined = false,
FLinearColor OutlineColor = FLinearColor ( 0.000000 , 0.000000 , 0.000000 , 1.000000 ) )

Draws text on the Canvas.

Parameters
RenderFontFont to use when rendering the text. If this is null, then a default engine font is used.
RenderTextText to render on the Canvas.
ScreenPositionScreen space position to render the text.
RenderColorColor to render the text.
KerningHorizontal spacing adjustment to modify the spacing between each letter.
ShadowColorColor to render the shadow of the text.
ShadowOffsetPixel offset relative to the screen space position to render the shadow of the text.
bCentreXIf true, then interpret the screen space position X coordinate as the center of the rendered text.
bCentreYIf true, then interpret the screen space position Y coordinate as the center of the rendered text.
bOutlinedIf true, then the text should be rendered with an outline.
OutlineColorColor to render the outline for the text.

◆ DrawTexture()

void DrawTexture ( UTexture RenderTexture,
FVector2D ScreenPosition,
FVector2D ScreenSize,
FVector2D CoordinatePosition,
FVector2D CoordinateSize = FVector2D ( 1.000000 , 1.000000 ),
FLinearColor RenderColor = FLinearColor ( 1.000000 , 1.000000 , 1.000000 , 1.000000 ),
EBlendMode BlendMode = EBlendMode :: BLEND_Translucent,
float32 Rotation = 0.000000,
FVector2D PivotPoint = FVector2D ( 0.500000 , 0.500000 ) )

Draws a texture on the Canvas.

Parameters
RenderTextureTexture to use when rendering. If no texture is set then this will use the default white texture.
ScreenPositionScreen space position to render the texture.
ScreenSizeScreen space size to render the texture.
CoordinatePositionNormalized UV starting coordinate to use when rendering the texture.
CoordinateSizeNormalized UV size coordinate to use when rendering the texture.
RenderColorColor to use when rendering the texture.
BlendModeBlending mode to use when rendering the texture.
RotationRotation, in degrees, to render the texture.
PivotPointNormalized pivot point to use when rotating the texture.

◆ DrawTriangles()

void DrawTriangles ( UTexture RenderTexture,
TArray< FCanvasUVTri > Triangles )

Draws a set of triangles on the Canvas.

Parameters
RenderTextureTexture to use when rendering the triangles. If no texture is set, then the default white texture is used.
TrianglesTriangles to render.

◆ Project()

FVector Project ( FVector WorldLocation)

Performs a projection of a world space coordinates using the projection matrix set up for the Canvas.

Parameters
WorldLocationWorld space location to project onto the Canvas rendering plane.
Returns
Returns a vector where X, Y defines a screen space position representing the world space location.

◆ StaticClass()

UClass StaticClass ( )
static

◆ WrappedTextSize()

FVector2D WrappedTextSize ( UFont RenderFont,
FString RenderText )

Returns the wrapped text size in screen space coordinates.

Parameters
RenderFontFont to use when determining the size of the text. If this is null, then a default engine font is used.
RenderTextText to determine the size of.
Returns
Returns the screen space size of the text.