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

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