engine
 
载入中...
搜索中...
未找到
Public 成员函数 | 静态 Public 成员函数 | Public 属性 | Protected 成员函数 | Protected 属性 | 所有成员列表
FSlateBrush结构体 参考

An brush which contains information about how to draw a Slate element 更多...

#include <SlateBrush.h>

+ 类 FSlateBrush 继承关系图:

Public 成员函数

void AddReferencedObjects (FReferenceCollector &Collector, UObject *ReferencingObject=nullptr)
 Report any references to UObjects to the reference collector.
 
 FSlateBrush ()
 Default constructor.
 
const FName GetResourceName () const
 Gets the name of the resource object, if any. 更多...
 
class UObject * GetResourceObject () const
 Gets the UObject that represents the brush resource, if any. 更多...
 
FLinearColor GetTint (const FWidgetStyle &InWidgetStyle) const
 Gets the brush's tint color. 更多...
 
const FBox2D & GetUVRegion () const
 Get brush UV region, should check if region is valid before using it 更多...
 
bool HasUObject () const
 Checks whether this brush has a UTexture object 更多...
 
bool IsDynamicallyLoaded () const
 Checks whether the brush resource is loaded dynamically. 更多...
 
bool operator!= (const FSlateBrush &Other) const
 Compares this brush with another for inequality. 更多...
 
bool operator== (const FSlateBrush &Other) const
 Compares this brush with another for equality. 更多...
 
void SetResourceObject (class UObject *InResourceObject)
 Sets the UObject that represents the brush resource.
 
void SetUVRegion (const FBox2D &InUVRegion)
 Set brush UV region 更多...
 
void UnlinkColors ()
 Unlinks all colors in this brush. 更多...
 

静态 Public 成员函数

static const FString UTextureIdentifier ()
 Gets the identifier for UObject based texture paths. 更多...
 

Public 属性

TEnumAsByte< enum ESlateBrushDrawType::Type > DrawAs
 How to draw the image
 
FVector2D ImageSize
 Size of the resource in Slate Units
 
TEnumAsByte< enum ESlateBrushImageType::Type > ImageType
 The type of image
 
FMargin Margin
 The margin to use in Box and Border modes
 
TEnumAsByte< enum ESlateBrushMirrorType::Type > Mirroring
 How to mirror the image in Image mode. 更多...
 
FSlateResourceHandle ResourceHandle
 Rendering resource for this brush
 
TEnumAsByte< enum ESlateBrushTileType::Type > Tiling
 How to tile the image in Image mode
 
FSlateColor TintColor
 Tinting applied to the image.
 

Protected 成员函数

FORCENOINLINE FSlateBrush (ESlateBrushDrawType::Type InDrawType, const FName InResourceName, const FMargin &InMargin, ESlateBrushTileType::Type InTiling, ESlateBrushImageType::Type InImageType, const FVector2D &InImageSize, const FLinearColor &InTint=FLinearColor::White, UObject *InObjectResource=nullptr, bool bInDynamicallyLoaded=false)
 This constructor is protected; use one of the deriving classes instead. 更多...
 

Protected 属性

uint8 bHasUObject_DEPRECATED:1
 Whether or not the brush has a UTexture resource
 
uint8 bIsDynamicallyLoaded:1
 Whether or not the brush path is a path to a UObject
 
FName ResourceName
 The name of the rendering resource to use
 
FBox2D UVRegion
 Optional UV region for an image When valid - overrides UV region specified in resource proxy
 

详细描述

An brush which contains information about how to draw a Slate element

示例
/github/workspace/Engine/Source/Runtime/UMG/Public/Components/Widget.h.

构造及析构函数说明

◆ FSlateBrush()

FORCENOINLINE FSlateBrush::FSlateBrush ( ESlateBrushDrawType::Type  InDrawType,
const FName  InResourceName,
const FMargin &  InMargin,
ESlateBrushTileType::Type  InTiling,
ESlateBrushImageType::Type  InImageType,
const FVector2D &  InImageSize,
const FLinearColor &  InTint = FLinearColor::White,
UObject *  InObjectResource = nullptr,
bool  bInDynamicallyLoaded = false 
)
protected

This constructor is protected; use one of the deriving classes instead.

参数
InDrawTypeHow to draw the texture
InResourceNameThe name of the resource
InMarginMargin to use in border and box modes
InTilingTile horizontally/vertically or both? (only in image mode)
InImageTypeThe type of image
InTintTint to apply to the element.

成员函数说明

◆ GetResourceName()

const FName FSlateBrush::GetResourceName ( ) const
inline

Gets the name of the resource object, if any.

返回
Resource name, or NAME_None if the resource object is not set.

◆ GetResourceObject()

class UObject * FSlateBrush::GetResourceObject ( ) const
inline

Gets the UObject that represents the brush resource, if any.

The object may be a UMaterialInterface or a UTexture.

返回
The resource object, or nullptr if it is not set.

◆ GetTint()

FLinearColor FSlateBrush::GetTint ( const FWidgetStyle &  InWidgetStyle) const
inline

Gets the brush's tint color.

参数
InWidgetStyleThe widget style to get the tint for.
返回
Tint color.

◆ GetUVRegion()

const FBox2D & FSlateBrush::GetUVRegion ( ) const
inline

Get brush UV region, should check if region is valid before using it

返回
UV region

◆ HasUObject()

bool FSlateBrush::HasUObject ( ) const
inline

Checks whether this brush has a UTexture object

返回
true if it has a UTexture object, false otherwise.

◆ IsDynamicallyLoaded()

bool FSlateBrush::IsDynamicallyLoaded ( ) const
inline

Checks whether the brush resource is loaded dynamically.

返回
true if loaded dynamically, false otherwise.

◆ operator!=()

bool FSlateBrush::operator!= ( const FSlateBrush &  Other) const
inline

Compares this brush with another for inequality.

参数
OtherThe other brush.
返回
false if the two brushes are equal, true otherwise.

◆ operator==()

bool FSlateBrush::operator== ( const FSlateBrush &  Other) const
inline

Compares this brush with another for equality.

参数
OtherThe other brush.
返回
true if the two brushes are equal, false otherwise.

◆ SetUVRegion()

void FSlateBrush::SetUVRegion ( const FBox2D &  InUVRegion)
inline

Set brush UV region

参数
InUVRegionWhen valid - overrides UV region specified in resource proxy

◆ UnlinkColors()

void FSlateBrush::UnlinkColors ( )
inline

Unlinks all colors in this brush.

参见
FSlateColor::Unlink

◆ UTextureIdentifier()

static const FString FSlateBrush::UTextureIdentifier ( )
static

Gets the identifier for UObject based texture paths.

返回
Texture identifier string.

类成员变量说明

◆ Mirroring

TEnumAsByte<enum ESlateBrushMirrorType::Type> FSlateBrush::Mirroring

How to mirror the image in Image mode.

This is normally only used for dynamic image brushes where the source texture comes from a hardware device such as a web camera.


该结构体的文档由以下文件生成: