Flutter Engine
The Flutter Engine
|
#include <Paragraph.h>
Classes | |
struct | ExtendedVisitorInfo |
struct | FontInfo |
struct | GlyphClusterInfo |
struct | GlyphInfo |
struct | VisitorInfo |
Public Types | |
enum | VisitorFlags { kWhiteSpace_VisitorFlag = 1 << 0 } |
using | Visitor = std::function< void(int lineNumber, const VisitorInfo *)> |
using | ExtendedVisitor = std::function< void(int lineNumber, const ExtendedVisitorInfo *)> |
Public Member Functions | |
Paragraph (ParagraphStyle style, sk_sp< FontCollection > fonts) | |
virtual | ~Paragraph ()=default |
SkScalar | getMaxWidth () |
SkScalar | getHeight () |
SkScalar | getMinIntrinsicWidth () |
SkScalar | getMaxIntrinsicWidth () |
SkScalar | getAlphabeticBaseline () |
SkScalar | getIdeographicBaseline () |
SkScalar | getLongestLine () |
bool | didExceedMaxLines () |
virtual void | layout (SkScalar width)=0 |
virtual void | paint (SkCanvas *canvas, SkScalar x, SkScalar y)=0 |
virtual void | paint (ParagraphPainter *painter, SkScalar x, SkScalar y)=0 |
virtual std::vector< TextBox > | getRectsForRange (unsigned start, unsigned end, RectHeightStyle rectHeightStyle, RectWidthStyle rectWidthStyle)=0 |
virtual std::vector< TextBox > | getRectsForPlaceholders ()=0 |
virtual PositionWithAffinity | getGlyphPositionAtCoordinate (SkScalar dx, SkScalar dy)=0 |
virtual SkRange< size_t > | getWordBoundary (unsigned offset)=0 |
virtual void | getLineMetrics (std::vector< LineMetrics > &)=0 |
virtual size_t | lineNumber ()=0 |
virtual void | markDirty ()=0 |
virtual int32_t | unresolvedGlyphs ()=0 |
virtual std::unordered_set< SkUnichar > | unresolvedCodepoints ()=0 |
virtual void | updateTextAlign (TextAlign textAlign)=0 |
virtual void | updateFontSize (size_t from, size_t to, SkScalar fontSize)=0 |
virtual void | updateForegroundPaint (size_t from, size_t to, SkPaint paint)=0 |
virtual void | updateBackgroundPaint (size_t from, size_t to, SkPaint paint)=0 |
virtual void | visit (const Visitor &)=0 |
virtual void | extendedVisit (const ExtendedVisitor &)=0 |
virtual int | getPath (int lineNumber, SkPath *dest)=0 |
virtual bool | containsEmoji (SkTextBlob *textBlob)=0 |
virtual bool | containsColorFontOrBitmap (SkTextBlob *textBlob)=0 |
virtual int | getLineNumberAt (TextIndex codeUnitIndex) const =0 |
virtual int | getLineNumberAtUTF16Offset (size_t codeUnitIndex)=0 |
virtual bool | getLineMetricsAt (int lineNumber, LineMetrics *lineMetrics) const =0 |
virtual TextRange | getActualTextRange (int lineNumber, bool includeSpaces) const =0 |
virtual bool | getGlyphClusterAt (TextIndex codeUnitIndex, GlyphClusterInfo *glyphInfo)=0 |
virtual bool | getClosestGlyphClusterAt (SkScalar dx, SkScalar dy, GlyphClusterInfo *glyphInfo)=0 |
virtual bool | getGlyphInfoAtUTF16Offset (size_t codeUnitIndex, GlyphInfo *glyphInfo)=0 |
virtual bool | getClosestUTF16GlyphInfoAt (SkScalar dx, SkScalar dy, GlyphInfo *glyphInfo)=0 |
virtual SkFont | getFontAt (TextIndex codeUnitIndex) const =0 |
virtual SkFont | getFontAtUTF16Offset (size_t codeUnitIndex)=0 |
virtual std::vector< FontInfo > | getFonts () const =0 |
Static Public Member Functions | |
static SkPath | GetPath (SkTextBlob *textBlob) |
Definition at line 19 of file Paragraph.h.
using skia::textlayout::Paragraph::ExtendedVisitor = std::function<void(int lineNumber, const ExtendedVisitorInfo*)> |
Definition at line 112 of file Paragraph.h.
using skia::textlayout::Paragraph::Visitor = std::function<void(int lineNumber, const VisitorInfo*)> |
Definition at line 98 of file Paragraph.h.
Enumerator | |
---|---|
kWhiteSpace_VisitorFlag |
Definition at line 83 of file Paragraph.h.
skia::textlayout::Paragraph::Paragraph | ( | ParagraphStyle | style, |
sk_sp< FontCollection > | fonts | ||
) |
Definition at line 58 of file ParagraphImpl.cpp.
|
virtualdefault |
|
pure virtual |
Implemented in skia::textlayout::ParagraphImpl.
|
pure virtual |
Implemented in skia::textlayout::ParagraphImpl.
|
inline |
Definition at line 40 of file Paragraph.h.
|
pure virtual |
Implemented in skia::textlayout::ParagraphImpl.
|
pure virtual |
Implemented in skia::textlayout::ParagraphImpl.
|
inline |
Definition at line 34 of file Paragraph.h.
|
pure virtual |
Finds the closest glyph cluster for a visual text position
dx | x coordinate |
dy | y coordinate |
glyphInfo | a glyph cluster info filled if not null |
Implemented in skia::textlayout::ParagraphImpl.
|
pure virtual |
Finds the information associated with the closest glyph to the given paragraph coordinates.
dx | x coordinate |
dy | y coordinate |
glyphInfo | an optional GlyphInfo struct to hold the information associated with the glyph found. The text indices and text ranges are described using UTF-16 offsets |
Implemented in skia::textlayout::ParagraphImpl.
Returns the font that is used to shape the text at the position
codeUnitIndex | text index |
Implemented in skia::textlayout::ParagraphImpl.
|
pure virtual |
Returns the font used to shape the text at the given UTF-16 offset.
codeUnitIndex | a UTF-16 offset in the paragraph |
Implemented in skia::textlayout::ParagraphImpl.
|
pure virtual |
Returns the information about all the fonts used to shape the paragraph text
Implemented in skia::textlayout::ParagraphImpl.
|
pure virtual |
Finds a glyph cluster for text index
codeUnitIndex | a text index |
glyphInfo | a glyph cluster info filled if not null |
Implemented in skia::textlayout::ParagraphImpl.
|
pure virtual |
Retrives the information associated with the glyph located at the given codeUnitIndex.
codeUnitIndex | a UTF-16 offset into the paragraph |
glyphInfo | an optional GlyphInfo struct to hold the information associated with the glyph found at the given index |
Implemented in skia::textlayout::ParagraphImpl.
|
pure virtual |
Implemented in skia::textlayout::ParagraphImpl.
|
inline |
Definition at line 28 of file Paragraph.h.
|
inline |
Definition at line 36 of file Paragraph.h.
|
pure virtual |
Implemented in skia::textlayout::ParagraphImpl.
|
pure virtual |
Implemented in skia::textlayout::ParagraphImpl.
|
pure virtual |
Implemented in skia::textlayout::ParagraphImpl.
|
pure virtual |
Implemented in skia::textlayout::ParagraphImpl.
|
inline |
Definition at line 38 of file Paragraph.h.
|
inline |
Definition at line 32 of file Paragraph.h.
|
inline |
Definition at line 26 of file Paragraph.h.
|
inline |
Definition at line 30 of file Paragraph.h.
Implemented in skia::textlayout::ParagraphImpl.
|
static |
Definition at line 1504 of file ParagraphImpl.cpp.
|
pure virtual |
Implemented in skia::textlayout::ParagraphImpl.
|
pure virtual |
Implemented in skia::textlayout::ParagraphImpl.
|
pure virtual |
Implemented in skia::textlayout::ParagraphImpl.
|
pure virtual |
Implemented in skia::textlayout::ParagraphImpl.
|
pure virtual |
Implemented in skia::textlayout::ParagraphImpl.
|
pure virtual |
Implemented in skia::textlayout::ParagraphImpl.
|
pure virtual |
Implemented in skia::textlayout::ParagraphImpl.
|
pure virtual |
Implemented in skia::textlayout::ParagraphImpl.
|
pure virtual |
Implemented in skia::textlayout::ParagraphImpl.
|
pure virtual |
Implemented in skia::textlayout::ParagraphImpl.
|
pure virtual |
Implemented in skia::textlayout::ParagraphImpl.
|
pure virtual |
Implemented in skia::textlayout::ParagraphImpl.
|
pure virtual |
Implemented in skia::textlayout::ParagraphImpl.
|
pure virtual |
Implemented in skia::textlayout::ParagraphImpl.
|
pure virtual |
Implemented in skia::textlayout::ParagraphImpl.
|
protected |
Definition at line 277 of file Paragraph.h.
|
protected |
Definition at line 284 of file Paragraph.h.
|
protected |
Definition at line 273 of file Paragraph.h.
|
protected |
Definition at line 279 of file Paragraph.h.
|
protected |
Definition at line 278 of file Paragraph.h.
|
protected |
Definition at line 283 of file Paragraph.h.
|
protected |
Definition at line 281 of file Paragraph.h.
|
protected |
Definition at line 282 of file Paragraph.h.
|
protected |
Definition at line 274 of file Paragraph.h.
|
protected |
Definition at line 280 of file Paragraph.h.