Navigation
API > API/Runtime > API/Runtime/SlateCore
A brush which contains information about how to draw a Slate element
| Name | FSlateBrush |
| Type | struct |
| Header File | /Engine/Source/Runtime/SlateCore/Public/Styling/SlateBrush.h |
| Include Path | #include "Styling/SlateBrush.h" |
Syntax
USTRUCT (BlueprintType )
struct FSlateBrush : public FSlateBrushFixLayout
Inheritance Hierarchy
- FSlateBrushFixLayout → FSlateBrush
Derived Classes
FSlateBrush derived class hierarchy
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FSlateBrush
(
ESlateBrushDrawType::Type InDrawType, |
Styling/SlateBrush.h | ||
FSlateBrush
(
ESlateBrushDrawType::Type InDrawType, |
Styling/SlateBrush.h | ||
FSlateBrush
(
ESlateBrushDrawType::Type InDrawType, |
This constructor is protected; use one of the deriving classes instead. | Styling/SlateBrush.h | |
FSlateBrush () |
Default constructor. | Styling/SlateBrush.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual ~FSlateBrush() |
Styling/SlateBrush.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| DrawAs | TEnumAsByte< enum ESlateBrushDrawType::Type > | How to draw the image | Styling/SlateBrush.h |
|
| ImageSize | FDeprecateSlateVector2D | Size of the resource in Slate Units | Styling/SlateBrush.h |
|
| ImageType | TEnumAsByte< enum ESlateBrushImageType::Type > | The type of image | Styling/SlateBrush.h |
|
| Margin | FMargin | The margin to use in Box and Border modes | Styling/SlateBrush.h |
|
| Mirroring | TEnumAsByte< enum ESlateBrushMirrorType::Type > | How to mirror the image in Image mode. | Styling/SlateBrush.h |
|
| OutlineSettings | FSlateBrushOutlineSettings | How to draw the outline. Currently only used for RoundedBox type brushes. | Styling/SlateBrush.h |
|
| ResourceHandle | FSlateResourceHandle | Rendering resource for this brush | Styling/SlateBrush.h | |
| Tiling | TEnumAsByte< enum ESlateBrushTileType::Type > | How to tile the image in Image mode | Styling/SlateBrush.h |
|
| TintColor | FSlateColor | Tinting applied to the image. | Styling/SlateBrush.h |
|
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| ResourceObject | TObjectPtr< UObject > | The image to render for this brush, can be a UTexture or UMaterialInterface or an object implementing the AtlasedTextureInterface. | Styling/SlateBrush.h |
|
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void AddReferencedObjects
(
FReferenceCollector& Collector, |
Report any references to UObjects to the reference collector. | Styling/SlateBrush.h | |
ESlateBrushDrawType::Type GetDrawType() |
Styling/SlateBrush.h | ||
UE::Slate::FDeprecateVector2DResult GetImageSize() |
Styling/SlateBrush.h | ||
ESlateBrushImageType::Type GetImageType() |
Styling/SlateBrush.h | ||
const FMargin & GetMargin() |
Styling/SlateBrush.h | ||
ESlateBrushMirrorType::Type GetMirroring() |
Styling/SlateBrush.h | ||
const FSlateResourceHandle & GetRenderingResource
(
UE::Slate::FDeprecateVector2DParameter LocalSize, |
Styling/SlateBrush.h | ||
const FSlateResourceHandle & GetRenderingResource () |
Styling/SlateBrush.h | ||
const FName GetResourceName() |
Gets the name of the resource object, if any. | Styling/SlateBrush.h | |
UObject * GetResourceObject () |
Gets the UObject that represents the brush resource, if any. | Styling/SlateBrush.h | |
ESlateBrushTileType::Type GetTiling() |
Styling/SlateBrush.h | ||
FLinearColor GetTint
(
const FWidgetStyle& InWidgetStyle |
Gets the brush's tint color. | Styling/SlateBrush.h | |
UE::Slate::FDeprecateBox2D GetUVRegion() |
Get brush UV region, should check if region is valid before using it | Styling/SlateBrush.h | |
bool HasUObject() |
Checks whether this brush has a UTexture object | Styling/SlateBrush.h | |
void InvalidateResourceHandle() |
Styling/SlateBrush.h | ||
bool IsDynamicallyLoaded() |
Checks whether the brush resource is loaded dynamically. | Styling/SlateBrush.h | |
bool IsSet() |
Styling/SlateBrush.h | ||
void SetImageSize
(
UE::Slate::FDeprecateVector2DParameter InImageSize |
Styling/SlateBrush.h | ||
void SetResourceObject
(
UObject* InResourceObject |
Sets the UObject that represents the brush resource. | Styling/SlateBrush.h | |
void SetUVRegion
(
const FBox2d& InUVRegion |
Set brush UV region | Styling/SlateBrush.h | |
void SetUVRegion
(
const FBox2f& InUVRegion |
Styling/SlateBrush.h | ||
void UnlinkColors () |
Unlinks all colors in this brush. | Styling/SlateBrush.h |
Protected
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static const FString UTextureIdentifier() |
Gets the identifier for UObject based texture paths. | Styling/SlateBrush.h |
Operators
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
bool operator!=
(
const FSlateBrush& Other |
Compares this brush with another for inequality. | Styling/SlateBrush.h | |
bool operator==
(
const FSlateBrush& Other |
Compares this brush with another for equality. | Styling/SlateBrush.h |
Deprecated Variables
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bHasUObject_DEPRECATED | uint8 | Whether or not the brush has a UTexture resource | Styling/SlateBrush.h | |
| Tint_DEPRECATED | FLinearColor | Tinting applied to the image. | Styling/SlateBrush.h |
|