FSlateBrush

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

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

SlateCore

Header

/Engine/Source/Runtime/SlateCore/Public/Styling/SlateBrush.h

Include

#include "Styling/SlateBrush.h"

Syntax

struct FSlateBrush

Remarks

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

Variables

Name Description

Protected variable

uint8: 1

 

bIsDynamicallyLoaded

Whether or not the brush path is a path to a UObject

Public variable

TEnumAsByte< en...

 

DrawAs

How to draw the image

Public variable

FVector2D

 

ImageSize

Size of the resource in Slate Units

Public variable

TEnumAsByte< en...

 

ImageType

The type of image

Public variable

FMargin

 

Margin

The margin to use in Box and Border modes

Public variable

TEnumAsByte< en...

 

Mirroring

How to mirror the image in Image mode.

Public variable

FSlateResourceH...

 

ResourceHandle

Rendering resource for this brush

Protected variable

FName

 

ResourceName

The name of the rendering resource to use

Public variable

TEnumAsByte< en...

 

Tiling

How to tile the image in Image mode

Public variable

FSlateColor

 

TintColor

Tinting applied to the image.

Protected variable

FBox2D

 

UVRegion

Optional UV region for an image When valid - overrides UV region specified in resource proxy

Constructors

Name Description

Public function

FSlateBrush()

Default constructor.

Protected function

FSlateBrush

(
    ESlateBrushDrawType::Type InDrawTyp...,
    const FName InResourceName,
    const FMargin& InMargin,
    ESlateBrushTileType::Type InTiling,
    ESlateBrushImageType::Type InImageT...,
    const FVector2D& InImageSize,
    const FLinearColor& InTint,
    UObject* InObjectResource,
    bool bInDynamicallyLoaded
)

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

Protected function

FSlateBrush

(
    ESlateBrushDrawType::Type InDrawTyp...,
    const FName InResourceName,
    const FMargin& InMargin,
    ESlateBrushTileType::Type InTiling,
    ESlateBrushImageType::Type InImageT...,
    const FVector2D& InImageSize,
    const TSharedRef< FLinearColor >& ...,
    UObject* InObjectResource,
    bool bInDynamicallyLoaded
)

Protected function

FSlateBrush

(
    ESlateBrushDrawType::Type InDrawTyp...,
    const FName InResourceName,
    const FMargin& InMargin,
    ESlateBrushTileType::Type InTiling,
    ESlateBrushImageType::Type InImageT...,
    const FVector2D& InImageSize,
    const FSlateColor& InTint,
    UObject* InObjectResource,
    bool bInDynamicallyLoaded
)

Destructors

Name Description

Public function Virtual

~FSlateBrush()

Functions

Name Description

Public function

void

 

AddReferencedObjects

(
    FReferenceCollector& Collector,
    UObject* ReferencingObject
)

Report any references to UObjects to the reference collector.

Public function Const

ESlateBrushD...

 

GetDrawType()

Public function Const

FVector2D

 

GetImageSize()

Public function Const

ESlateBrushI...

 

GetImageType()

Public function Const

const FMargi...

 

GetMargin()

Public function Const

ESlateBrushM...

 

GetMirroring()

Public function Const

const FSlate...

 

GetRenderingResource()

Public function Const

const FName

 

GetResourceName()

Gets the name of the resource object, if any.

Public function Const

UObject *...

 

GetResourceObject()

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

Public function Const

ESlateBrushT...

 

GetTiling()

Public function Const

FLinearColor

 

GetTint

(
    const FWidgetStyle& InWidgetStyle
)

Gets the brush's tint color.

Public function Const

const FBox2D...

 

GetUVRegion()

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

Public function Const

bool

 

HasUObject()

Checks whether this brush has a UTexture object

Public function

void

 

InvalidateResourceHandle()

Public function Const

bool

 

IsDynamicallyLoaded()

Checks whether the brush resource is loaded dynamically.

Public function

void

 

SetImageSize

(
    FVector2D InImageSize
)

Public function

void

 

SetResourceObject

(
    UObject* InResourceObject
)

Sets the UObject that represents the brush resource.

Public function

void

 

SetUVRegion

(
    const FBox2D& InUVRegion
)

Set brush UV region

Public function

void

 

UnlinkColors()

Unlinks all colors in this brush.

Public function Static

const FStrin...

 

UTextureIdentifier()

Gets the identifier for UObject based texture paths.

Operators

Name Description

Public function Const

bool

 

operator!=

(
    const FSlateBrush& Other
)

Compares this brush with another for inequality.

Public function Const

bool

 

operator==

(
    const FSlateBrush& Other
)

Compares this brush with another for equality.

Deprecated Variables

Name Description

Protected variable

uint8: 1

 

bHasUObject_DEPRECATED

Whether or not the brush has a UTexture resource

Public variable

FLinearColor

 

Tint_DEPRECATED

Tinting applied to the image.

Select Skin
Light
Dark

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback