Navigation
API > API/Runtime > API/Runtime/SlateCore
Holds texture data for upload to a rendering resource Makes a copy of the bytes passed to it and holds ownership of the image data array.
Note that "BytesPerPixel" is a variable but in practice this must be BGRA8-SRGB , and BytesPerPixel == 4
| Name | FSlateTextureData |
| Type | struct |
| Header File | /Engine/Source/Runtime/SlateCore/Public/Textures/SlateTextureData.h |
| Include Path | #include "Textures/SlateTextureData.h" |
Syntax
struct FSlateTextureData
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FSlateTextureData
(
const uint8* InBuffer, |
Constructor to create texture data by copying from a pointer instead of an array | Textures/SlateTextureData.h | |
FSlateTextureData
(
const FSlateTextureData& Other |
Textures/SlateTextureData.h | ||
FSlateTextureData
(
const FImageView& Other |
Textures/SlateTextureData.h | ||
FSlateTextureData
(
FImage&& Other |
Textures/SlateTextureData.h | ||
FSlateTextureData
(
uint32 InWidth, |
Textures/SlateTextureData.h | ||
FSlateTextureData
(
uint32 InWidth, |
Move from TArray : | Textures/SlateTextureData.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
~FSlateTextureData() |
Textures/SlateTextureData.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| Bytes | TArray< uint8 > | Raw uncompressed texture data (in practice always FColor, BGRA8-sRGB | Textures/SlateTextureData.h | |
| BytesPerPixel | uint32 | The number of bytes of each pixel (in practice must always be 4) | Textures/SlateTextureData.h | |
| Height | uint32 | Height of the texture | Textures/SlateTextureData.h | |
| Width | uint32 | Width of the texture | Textures/SlateTextureData.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void Empty() |
Textures/SlateTextureData.h | ||
uint32 GetBytesPerPixel() |
Textures/SlateTextureData.h | ||
uint32 GetHeight() |
Textures/SlateTextureData.h | ||
const TArray< uint8 > & GetRawBytes() |
Textures/SlateTextureData.h | ||
uint8 * GetRawBytesPtr() |
Accesses the raw bytes of already sized texture data | Textures/SlateTextureData.h | |
uint32 GetWidth() |
Textures/SlateTextureData.h | ||
void SetImage
(
FImage&& MoveFrom |
Move FImage into the FSlateTextureData convert to BGRA8-SRGB if not already in that format | Textures/SlateTextureData.h | |
void SetImage
(
const FImageView& Image |
Copy FImageView into the FSlateTextureData convert to BGRA8-SRGB if not already in that format | Textures/SlateTextureData.h | |
void SetRawData
(
uint32 InWidth, |
Textures/SlateTextureData.h |
Operators
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FSlateTextureData & operator=
(
const FSlateTextureData& Other |
Textures/SlateTextureData.h |