SImage

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

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

Protected variable

TAttribute< FSl...

 

ColorAndOpacity

Color and opacity scale for this image

Protected variable

FInvalidatableB...

 

Image

The slate brush to draw for the image that we can invalidate.

Protected variable

FPointerEventHa...

 

OnMouseButtonDownHandler

Invoked when the mouse is pressed in the image

Constructors

Name Description

Public function

SImage()

Constructor

Functions

Name Description

Public function

void

 

Construct

(
    const FArguments& InArgs
)

Construct this widget

Public function

void

 

SetColorAndOpacity

(
    const TAttribute< FSlateColor >& I...
)

See the ColorAndOpacity attribute

Public function

void

 

SetColorAndOpacity

(
    FLinearColor InColorAndOpacity
)

See the ColorAndOpacity attribute

Public function

void

 

SetImage

(
    TAttribute< const FSlateBrush*...
)

See the Image attribute

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.

Classes

Name

Description

Public struct

FArguments

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss