engine
 
载入中...
搜索中...
未找到
函数
ShapedTextCacheUtil 命名空间参考

Utility functions that can provide efficient caching of common operations 更多...

函数

SLATE_API int32 FindCharacterIndexAtOffset (const FShapedTextCacheRef &InShapedTextCache, const FCachedShapedTextKey &InRunKey, const FTextRange &InTextRange, const TCHAR *InText, const int32 InHorizontalOffset)
 Find the character index at the specified position in pixels along the string horizontally 更多...
 
SLATE_API int8 GetShapedGlyphKerning (const FShapedTextCacheRef &InShapedTextCache, const FCachedShapedTextKey &InRunKey, const int32 InGlyphIndex, const TCHAR *InText)
 Get the kerning between two shaped glyphs 更多...
 
SLATE_API FShapedGlyphSequenceRef GetShapedTextSubSequence (const FShapedTextCacheRef &InShapedTextCache, const FCachedShapedTextKey &InRunKey, const FTextRange &InTextRange, const TCHAR *InText, const TextBiDi::ETextDirection InTextDirection)
 Extract a sub-section of a run of text into its own shaped glyph sequence 更多...
 
SLATE_API FVector2D MeasureShapedText (const FShapedTextCacheRef &InShapedTextCache, const FCachedShapedTextKey &InRunKey, const FTextRange &InMeasureRange, const TCHAR *InText)
 Measure a sub-section of a run of text 更多...
 

详细描述

Utility functions that can provide efficient caching of common operations

函数说明

◆ FindCharacterIndexAtOffset()

SLATE_API int32 ShapedTextCacheUtil::FindCharacterIndexAtOffset ( const FShapedTextCacheRef &  InShapedTextCache,
const FCachedShapedTextKey &  InRunKey,
const FTextRange &  InTextRange,
const TCHAR *  InText,
const int32  InHorizontalOffset 
)

Find the character index at the specified position in pixels along the string horizontally

参数
InShapedTextCacheThe shaped text cache to use
InRunKeyThe key identifying the cached shaped text for the run
InTextRangeThe range of text that should be extracted into its own shaped glyph sequence
InTextThe text to shape if we can't find the shaped text in the cache. InTextRange may specify a sub-section of the entire text
InHorizontalOffsetThe horizontal offset to get the character index for
返回
The index of the character closest to the specified horizontal offset

◆ GetShapedGlyphKerning()

SLATE_API int8 ShapedTextCacheUtil::GetShapedGlyphKerning ( const FShapedTextCacheRef &  InShapedTextCache,
const FCachedShapedTextKey &  InRunKey,
const int32  InGlyphIndex,
const TCHAR *  InText 
)

Get the kerning between two shaped glyphs

参数
InShapedTextCacheThe shaped text cache to use
InRunKeyThe key identifying the cached shaped text for the run
InGlyphIndexThe index of the glyph to get the kerning for (will get it between the given glyph, and it's next glyph)
InTextThe text to shape if we can't find the shaped text in the cache. (InGlyphIndex, InGlyphIndex+1) will be the range used
返回
The kerning

◆ GetShapedTextSubSequence()

SLATE_API FShapedGlyphSequenceRef ShapedTextCacheUtil::GetShapedTextSubSequence ( const FShapedTextCacheRef &  InShapedTextCache,
const FCachedShapedTextKey &  InRunKey,
const FTextRange &  InTextRange,
const TCHAR *  InText,
const TextBiDi::ETextDirection  InTextDirection 
)

Extract a sub-section of a run of text into its own shaped glyph sequence

参数
InShapedTextCacheThe shaped text cache to use
InRunKeyThe key identifying the cached shaped text for the run
InTextRangeThe range of text that should be extracted into its own shaped glyph sequence
InTextThe text to shape if we can't find the shaped text in the cache. InTextRange may specify a sub-section of the entire text
InTextDirectionThe text direction of all of the text to be shaped
返回
The shaped text

◆ MeasureShapedText()

SLATE_API FVector2D ShapedTextCacheUtil::MeasureShapedText ( const FShapedTextCacheRef &  InShapedTextCache,
const FCachedShapedTextKey &  InRunKey,
const FTextRange &  InMeasureRange,
const TCHAR *  InText 
)

Measure a sub-section of a run of text

参数
InShapedTextCacheThe shaped text cache to use
InRunKeyThe key identifying the cached shaped text for the run
InMeasureRangeThe range of text that should be measured
InTextThe text to shape if we can't find the shaped text in the cache. InMeasureRange may specify a sub-section of the entire text
返回
The measured size of the shaped text