Navigation
API > API/Runtime > API/Runtime/Engine > API/Runtime/Engine/UCanvas
Overloads
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void WrapString
(
FTextSizingParameters& Parameters, |
Engine/Canvas.h | ||
static void WrapString
(
FCanvasWordWrapper& Wrapper, |
Parses a single string into an array of strings that will fit inside the specified bounding region. | Engine/Canvas.h |
WrapString(FTextSizingParameters &, const float, FStringView, TArray< FWrappedStringElement > &, FCanvasWordWrapper::FWrappedLineData *const)
| Name | WrapString |
| Type | function |
| Header File | /Engine/Source/Runtime/Engine/Classes/Engine/Canvas.h |
| Include Path | #include "Engine/Canvas.h" |
| Source | /Engine/Source/Runtime/Engine/Private/UserInterface/Canvas.cpp |
void WrapString
(
FTextSizingParameters & Parameters,
const float InCurX,
FStringView Text,
TArray < FWrappedStringElement > & out_Lines,
FCanvasWordWrapper::FWrappedLineData *const OutWrappedLineData
)
WrapString(FCanvasWordWrapper &, FTextSizingParameters &, const float, FStringView, TArray< FWrappedStringElement > &, FCanvasWordWrapper::FWrappedLineData *const)
Description
Parses a single string into an array of strings that will fit inside the specified bounding region.
| Name | WrapString |
| Type | function |
| Header File | /Engine/Source/Runtime/Engine/Classes/Engine/Canvas.h |
| Include Path | #include "Engine/Canvas.h" |
| Source | /Engine/Source/Runtime/Engine/Private/UserInterface/Canvas.cpp |
static void WrapString
(
FCanvasWordWrapper & Wrapper,
FTextSizingParameters & Parameters,
const float InCurX,
FStringView Text,
TArray < FWrappedStringElement > & out_Lines,
FCanvasWordWrapper::FWrappedLineData *const OutWrappedLineData
)
Parameters
| Name | Remarks |
|---|---|
| Parameters | Used for various purposes: DrawX: [in] specifies the pixel location of the start of the horizontal bounding region that should be used for wrapping. DrawY: [in] specifies the Y origin of the bounding region. This should normally be set to 0, as this will be used as the base value for DrawYL. [out] Will be set to the Y position (+YL) of the last line, i.e. the total height of all wrapped lines relative to the start of the bounding region DrawXL: [in] specifies the pixel location of the end of the horizontal bounding region that should be used for wrapping DrawYL: [in] specifies the height of the bounding region, in pixels. A input value of 0 indicates that the bounding region height should not be considered. Once the total height of lines reaches this value, the function returns and no further processing occurs. DrawFont: [in] specifies the font to use for retrieving the size of the characters in the string Scale: [in] specifies the amount of scaling to apply to the string |
| CurX | specifies the pixel location to begin the wrapping; usually equal to the X pos of the bounding region, unless wrapping is initiated in the middle of the bounding region (i.e. indentation) |
| Text | the text that should be wrapped |
| out_Lines | [out] will contain an array of strings which fit inside the bounding region specified. Does not clear the array first. |
| OutWrappedLineData | An optional array to fill with the indices from the source string marking the begin and end points of the wrapped lines |