engine
 
载入中...
搜索中...
未找到
Public 类型 | Public 成员函数 | 静态 Public 成员函数 | 友元 | 所有成员列表
FSlateDrawElement类 参考

FSlateDrawElement is the building block for Slate's rendering interface. 更多...

#include <DrawElements.h>

Public 类型

enum  ERotationSpace { RelativeToElement , RelativeToWorld }
 

Public 成员函数

void ApplyPositionOffset (const FVector2D &InOffset)
 Update element cached position with an arbitrary offset 更多...
 

静态 Public 成员函数

static SLATECORE_API void MakeBox (FSlateWindowElementList &ElementList, uint32 InLayer, const FPaintGeometry &PaintGeometry, const FSlateBrush *InBrush, ESlateDrawEffect InDrawEffects=ESlateDrawEffect::None, const FLinearColor &InTint=FLinearColor::White)
 Creates a box element based on the following diagram. 更多...
 
static SLATECORE_API void MakeCubicBezierSpline (FSlateWindowElementList &ElementList, uint32 InLayer, const FPaintGeometry &PaintGeometry, const FVector2D &P0, const FVector2D &P1, const FVector2D &P2, const FVector2D &P3, float InThickness=0.0f, ESlateDrawEffect InDrawEffects=ESlateDrawEffect::None, const FLinearColor &InTint=FLinearColor::White)
 Creates a Bezier Spline element 更多...
 
static SLATECORE_API void MakeCustom (FSlateWindowElementList &ElementList, uint32 InLayer, TSharedPtr< ICustomSlateElement, ESPMode::ThreadSafe > CustomDrawer)
 Creates a custom element which can be used to manually draw into the Slate render target with graphics API calls rather than Slate elements 更多...
 
static SLATECORE_API void MakeDebugQuad (FSlateWindowElementList &ElementList, uint32 InLayer, const FPaintGeometry &PaintGeometry, const FLinearColor &InTint=FLinearColor::White)
 Creates a wireframe quad for debug purposes 更多...
 
static SLATECORE_API void MakeDrawSpaceGradientSpline (FSlateWindowElementList &ElementList, uint32 InLayer, const FVector2D &InStart, const FVector2D &InStartDir, const FVector2D &InEnd, const FVector2D &InEndDir, const TArray< FSlateGradientStop > &InGradientStops, float InThickness=0.0f, ESlateDrawEffect InDrawEffects=ESlateDrawEffect::None)
 Just like MakeSpline but in draw-space coordinates. 更多...
 
static SLATECORE_API void MakeDrawSpaceSpline (FSlateWindowElementList &ElementList, uint32 InLayer, const FVector2D &InStart, const FVector2D &InStartDir, const FVector2D &InEnd, const FVector2D &InEndDir, float InThickness=0.0f, ESlateDrawEffect InDrawEffects=ESlateDrawEffect::None, const FLinearColor &InTint=FLinearColor::White)
 Just like MakeSpline but in draw-space coordinates. 更多...
 
static SLATECORE_API void MakeGradient (FSlateWindowElementList &ElementList, uint32 InLayer, const FPaintGeometry &PaintGeometry, TArray< FSlateGradientStop > InGradientStops, EOrientation InGradientType, ESlateDrawEffect InDrawEffects=ESlateDrawEffect::None)
 Creates a gradient element 更多...
 
static SLATECORE_API void MakeLines (FSlateWindowElementList &ElementList, uint32 InLayer, const FPaintGeometry &PaintGeometry, const TArray< FVector2D > &Points, ESlateDrawEffect InDrawEffects=ESlateDrawEffect::None, const FLinearColor &InTint=FLinearColor::White, bool bAntialias=true, float Thickness=1.0f)
 Creates a line defined by the provided points 更多...
 
static SLATECORE_API void MakeShapedText (FSlateWindowElementList &ElementList, uint32 InLayer, const FPaintGeometry &PaintGeometry, const FShapedGlyphSequenceRef &InShapedGlyphSequence, ESlateDrawEffect InDrawEffects, const FLinearColor &BaseTint, const FLinearColor &OutlineTint)
 Creates a text element which displays a series of shaped glyphs on the screen 更多...
 
static SLATECORE_API void MakeSpline (FSlateWindowElementList &ElementList, uint32 InLayer, const FPaintGeometry &PaintGeometry, const FVector2D &InStart, const FVector2D &InStartDir, const FVector2D &InEnd, const FVector2D &InEndDir, float InThickness=0.0f, ESlateDrawEffect InDrawEffects=ESlateDrawEffect::None, const FLinearColor &InTint=FLinearColor::White)
 Creates a Hermite Spline element 更多...
 
static SLATECORE_API void MakeText (FSlateWindowElementList &ElementList, uint32 InLayer, const FPaintGeometry &PaintGeometry, const FString &InText, const int32 StartIndex, const int32 EndIndex, const FSlateFontInfo &InFontInfo, ESlateDrawEffect InDrawEffects=ESlateDrawEffect::None, const FLinearColor &InTint=FLinearColor::White)
 Creates a text element which displays a string of a rendered in a certain font on the screen 更多...
 
static SLATECORE_API void MakeViewport (FSlateWindowElementList &ElementList, uint32 InLayer, const FPaintGeometry &PaintGeometry, TSharedPtr< const ISlateViewport > Viewport, ESlateDrawEffect InDrawEffects=ESlateDrawEffect::None, const FLinearColor &InTint=FLinearColor::White)
 Creates a viewport element which is useful for rendering custom data in a texture into Slate 更多...
 

友元

class FSlateWindowElementList
 

详细描述

FSlateDrawElement is the building block for Slate's rendering interface.

Slate describes its visual output as an ordered list of FSlateDrawElement s

成员枚举类型说明

◆ ERotationSpace

枚举值
RelativeToElement 

Relative to the element.

(0,0) is the upper left corner of the element

RelativeToWorld 

Relative to the alloted paint geometry.

(0,0) is the upper left corner of the paint geometry

成员函数说明

◆ ApplyPositionOffset()

void FSlateDrawElement::ApplyPositionOffset ( const FVector2D &  InOffset)

Update element cached position with an arbitrary offset

参数
ElementElement to update
InOffsetAbsolute translation delta

◆ MakeBox()

static SLATECORE_API void FSlateDrawElement::MakeBox ( FSlateWindowElementList &  ElementList,
uint32  InLayer,
const FPaintGeometry &  PaintGeometry,
const FSlateBrush *  InBrush,
ESlateDrawEffect  InDrawEffects = ESlateDrawEffect::None,
const FLinearColor &  InTint = FLinearColor::White 
)
static

Creates a box element based on the following diagram.

Allows for this element to be resized while maintain the border of the image If there are no margins the resulting box is simply a quad ___LeftMargin ___RightMargin / / +–+----------—+–+ | |c1 |c2| ___TopMargin +–o----------—o–+ | | | | | |c3 |c4| +–o----------—o–+ | | | | ___BottomMargin +–+----------—+–+

参数
ElementListThe list in which to add elements
InLayerThe layer to draw the element on
PaintGeometryDrawSpace position and dimensions; see FPaintGeometry
InBrushBrush to apply to this element
InDrawEffectsOptional draw effects to apply
InTintColor to tint the element

◆ MakeCubicBezierSpline()

static SLATECORE_API void FSlateDrawElement::MakeCubicBezierSpline ( FSlateWindowElementList &  ElementList,
uint32  InLayer,
const FPaintGeometry &  PaintGeometry,
const FVector2D &  P0,
const FVector2D &  P1,
const FVector2D &  P2,
const FVector2D &  P3,
float  InThickness = 0.0f,
ESlateDrawEffect  InDrawEffects = ESlateDrawEffect::None,
const FLinearColor &  InTint = FLinearColor::White 
)
static

Creates a Bezier Spline element

参数
ElementListThe list in which to add elements
InLayerThe layer to draw the element on
PaintGeometryDrawSpace position and dimensions; see FPaintGeometry
InStartThe start point of the spline (local space)
InStartDirThe direction of the spline from the start point
InEndThe end point of the spline (local space)
InEndDirThe direction of the spline to the end point
InDrawEffectsOptional draw effects to apply
InTintColor to tint the element

◆ MakeCustom()

static SLATECORE_API void FSlateDrawElement::MakeCustom ( FSlateWindowElementList &  ElementList,
uint32  InLayer,
TSharedPtr< ICustomSlateElement, ESPMode::ThreadSafe >  CustomDrawer 
)
static

Creates a custom element which can be used to manually draw into the Slate render target with graphics API calls rather than Slate elements

参数
ElementListThe list in which to add elements
InLayerThe layer to draw the element on
PaintGeometryDrawSpace position and dimensions; see FPaintGeometry
CustomDrawerInterface to a drawer which will be called when Slate renders this element

◆ MakeDebugQuad()

static SLATECORE_API void FSlateDrawElement::MakeDebugQuad ( FSlateWindowElementList &  ElementList,
uint32  InLayer,
const FPaintGeometry &  PaintGeometry,
const FLinearColor &  InTint = FLinearColor::White 
)
static

Creates a wireframe quad for debug purposes

参数
ElementListThe list in which to add elements
InLayerThe layer to draw the element on
PaintGeometryDrawSpace position and dimensions; see FPaintGeometry

◆ MakeDrawSpaceGradientSpline()

static SLATECORE_API void FSlateDrawElement::MakeDrawSpaceGradientSpline ( FSlateWindowElementList &  ElementList,
uint32  InLayer,
const FVector2D &  InStart,
const FVector2D &  InStartDir,
const FVector2D &  InEnd,
const FVector2D &  InEndDir,
const TArray< FSlateGradientStop > &  InGradientStops,
float  InThickness = 0.0f,
ESlateDrawEffect  InDrawEffects = ESlateDrawEffect::None 
)
static

Just like MakeSpline but in draw-space coordinates.

This is useful for connecting already-transformed widgets together.

◆ MakeDrawSpaceSpline()

static SLATECORE_API void FSlateDrawElement::MakeDrawSpaceSpline ( FSlateWindowElementList &  ElementList,
uint32  InLayer,
const FVector2D &  InStart,
const FVector2D &  InStartDir,
const FVector2D &  InEnd,
const FVector2D &  InEndDir,
float  InThickness = 0.0f,
ESlateDrawEffect  InDrawEffects = ESlateDrawEffect::None,
const FLinearColor &  InTint = FLinearColor::White 
)
static

Just like MakeSpline but in draw-space coordinates.

This is useful for connecting already-transformed widgets together.

◆ MakeGradient()

static SLATECORE_API void FSlateDrawElement::MakeGradient ( FSlateWindowElementList &  ElementList,
uint32  InLayer,
const FPaintGeometry &  PaintGeometry,
TArray< FSlateGradientStop >  InGradientStops,
EOrientation  InGradientType,
ESlateDrawEffect  InDrawEffects = ESlateDrawEffect::None 
)
static

Creates a gradient element

参数
ElementListThe list in which to add elements
InLayerThe layer to draw the element on
PaintGeometryDrawSpace position and dimensions; see FPaintGeometry
InGradientStopsList of gradient stops which define the element
InGradientTypeThe type of gradient (I.E Horizontal, vertical)
InDrawEffectsOptional draw effects to apply

◆ MakeLines()

static SLATECORE_API void FSlateDrawElement::MakeLines ( FSlateWindowElementList &  ElementList,
uint32  InLayer,
const FPaintGeometry &  PaintGeometry,
const TArray< FVector2D > &  Points,
ESlateDrawEffect  InDrawEffects = ESlateDrawEffect::None,
const FLinearColor &  InTint = FLinearColor::White,
bool  bAntialias = true,
float  Thickness = 1.0f 
)
static

Creates a line defined by the provided points

参数
ElementListThe list in which to add elements
InLayerThe layer to draw the element on
PaintGeometryDrawSpace position and dimensions; see FPaintGeometry
PointsPoints that make up the lines. The points are joined together. I.E if Points has A,B,C there the line is A-B-C. To draw non-joining line segments call MakeLines multiple times
InDrawEffectsOptional draw effects to apply
InTintColor to tint the element
bAntialiasShould antialiasing be applied to the line?
ThicknessThe thickness of the line

◆ MakeShapedText()

static SLATECORE_API void FSlateDrawElement::MakeShapedText ( FSlateWindowElementList &  ElementList,
uint32  InLayer,
const FPaintGeometry &  PaintGeometry,
const FShapedGlyphSequenceRef &  InShapedGlyphSequence,
ESlateDrawEffect  InDrawEffects,
const FLinearColor &  BaseTint,
const FLinearColor &  OutlineTint 
)
static

Creates a text element which displays a series of shaped glyphs on the screen

参数
ElementListThe list in which to add elements
InLayerThe layer to draw the element on
PaintGeometryDrawSpace position and dimensions; see FPaintGeometry
InShapedGlyphSequenceThe shaped glyph sequence to draw
InDrawEffectsOptional draw effects to apply
InTintColor to tint the element

◆ MakeSpline()

static SLATECORE_API void FSlateDrawElement::MakeSpline ( FSlateWindowElementList &  ElementList,
uint32  InLayer,
const FPaintGeometry &  PaintGeometry,
const FVector2D &  InStart,
const FVector2D &  InStartDir,
const FVector2D &  InEnd,
const FVector2D &  InEndDir,
float  InThickness = 0.0f,
ESlateDrawEffect  InDrawEffects = ESlateDrawEffect::None,
const FLinearColor &  InTint = FLinearColor::White 
)
static

Creates a Hermite Spline element

参数
ElementListThe list in which to add elements
InLayerThe layer to draw the element on
PaintGeometryDrawSpace position and dimensions; see FPaintGeometry
InStartThe start point of the spline (local space)
InStartDirThe direction of the spline from the start point
InEndThe end point of the spline (local space)
InEndDirThe direction of the spline to the end point
InDrawEffectsOptional draw effects to apply
InTintColor to tint the element

◆ MakeText()

static SLATECORE_API void FSlateDrawElement::MakeText ( FSlateWindowElementList &  ElementList,
uint32  InLayer,
const FPaintGeometry &  PaintGeometry,
const FString &  InText,
const int32  StartIndex,
const int32  EndIndex,
const FSlateFontInfo &  InFontInfo,
ESlateDrawEffect  InDrawEffects = ESlateDrawEffect::None,
const FLinearColor &  InTint = FLinearColor::White 
)
static

Creates a text element which displays a string of a rendered in a certain font on the screen

参数
ElementListThe list in which to add elements
InLayerThe layer to draw the element on
PaintGeometryDrawSpace position and dimensions; see FPaintGeometry
InTextThe string to draw
StartIndexInclusive index to start rendering from on the specified text
EndIndexExclusive index to stop rendering on the specified text
InFontInfoThe font to draw the string with
InDrawEffectsOptional draw effects to apply
InTintColor to tint the element

◆ MakeViewport()

static SLATECORE_API void FSlateDrawElement::MakeViewport ( FSlateWindowElementList &  ElementList,
uint32  InLayer,
const FPaintGeometry &  PaintGeometry,
TSharedPtr< const ISlateViewport >  Viewport,
ESlateDrawEffect  InDrawEffects = ESlateDrawEffect::None,
const FLinearColor &  InTint = FLinearColor::White 
)
static

Creates a viewport element which is useful for rendering custom data in a texture into Slate

参数
ElementListThe list in which to add elements
InLayerThe layer to draw the element on
PaintGeometryDrawSpace position and dimensions; see FPaintGeometry
ViewportInterface for drawing the viewport
InScaleDraw scale to apply to the entire element
InDrawEffectsOptional draw effects to apply
InTintColor to tint the element

该类的文档由以下文件生成: