SImage

Implements a widget that displays an image with a desired width and height.

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

References

Module

SlateCore

Header

/Engine/Source/Runtime/SlateCore/Public/Widgets/Images/SImage.h

Include

#include "Widgets/Images/SImage.h"

Syntax

class SImage : public SLeafWidget

Remarks

Implements a widget that displays an image with a desired width and height.

Variables

Name Description

Protected variable

bool

 

bFlipForRightToLeftFlowDirection

Flips the image if the localization's flow direction is RightToLeft

Constructors

Name Description

Public function

SImage()

Constructor

Functions

Name Description

Public function

void

 

Construct

(
    const FArguments& InArgs
)

Construct this widget

Protected function Const

TSlateAttrib...

 

GetColorAndOpacityAttribute()

Protected function Const

TSlateAttrib...

 

GetDesiredSizeOverrideAttribute()

Protected function Const

TSlateAttrib...

 

GetImageAttribute()

Public function

void

 

SetColorAndOpacity

(
    TAttribute< FSlateColor > InColorAn...
)

Set the ColorAndOpacity attribute

Public function

void

 

SetColorAndOpacity

(
    FLinearColor InColorAndOpacity
)

See the ColorAndOpacity attribute

Public function

void

 

SetDesiredSizeOverride

(
    TAttribute< TOptional< FVector2D >>...
)

Set SizeOverride attribute

Public function

void

 

SetImage

(
    TAttribute< const FSlateBrush*...
)

Set the Image attribute

Public function Static

const FSlate...

 

StaticWidgetClass()

Overridden from SWidget

Name Description

Protected function Virtual Const

FVector2D

 

ComputeDesiredSize

(
    float
)

Overwritten from SWidget.

Public function Virtual

TSharedRef< ...

 

CreateAccessibleWidget()

Public function Virtual Const

int32

 

OnPaint

(
    const FPaintArgs& Args,
    const FGeometry& AllottedGeometry,
    const FSlateRect& MyCullingRect,
    FSlateWindowElementList& OutDrawEl...,
    int32 LayerId,
    const FWidgetStyle& InWidgetStyle,
    bool bParentEnabled
)

Overwritten from SWidget.

Overridden from FSlateControlledConstruction

Name Description

Public function Virtual Const

const FSlate...

 

GetWidgetClass()

Classes

Name

Description

Public struct

FArguments

Typedefs

Deprecated Variables

Name Description

Protected variable

TSlateDeprecate...

 

ColorAndOpacity

Direct access to ColorAndOpacity is now deprecated. Use the setter or getter.

Protected variable

TSlateDeprecate...

 

DesiredSizeOverride

Direct access to DesiredSizeOverride is now deprecated. Use the setter or getter.

Protected variable

FInvalidatableB...

 

Image

Direct access to Image is now deprecated. Use the setter or getter.