Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
SVGTextBuilder Class Reference
Inheritance diagram for SVGTextBuilder:
SkNoncopyable

Public Member Functions

 SVGTextBuilder (SkPoint origin, const sktext::GlyphRun &glyphRun)
 
const SkStringtext () const
 
const SkStringposX () const
 
const SkStringposY () const
 

Detailed Description

Definition at line 1046 of file SkSVGDevice.cpp.

Constructor & Destructor Documentation

◆ SVGTextBuilder()

SVGTextBuilder::SVGTextBuilder ( SkPoint  origin,
const sktext::GlyphRun glyphRun 
)
inline

Definition at line 1048 of file SkSVGDevice.cpp.

1049 : fOrigin(origin) {
1050 auto runSize = glyphRun.runSize();
1051 AutoSTArray<64, SkUnichar> unichars(runSize);
1052 SkFontPriv::GlyphsToUnichars(glyphRun.font(), glyphRun.glyphsIDs().data(),
1053 runSize, unichars.get());
1054 auto positions = glyphRun.positions();
1055 for (size_t i = 0; i < runSize; ++i) {
1056 this->appendUnichar(unichars[i], positions[i]);
1057 }
1058 }
static void GlyphsToUnichars(const SkFont &, const uint16_t glyphs[], int count, SkUnichar[])
Definition: SkFont.cpp:396
const SkFont & font() const
Definition: GlyphRun.h:51
size_t runSize() const
Definition: GlyphRun.h:47
SkSpan< const SkGlyphID > glyphsIDs() const
Definition: GlyphRun.h:49
SkSpan< const SkPoint > positions() const
Definition: GlyphRun.h:48

Member Function Documentation

◆ posX()

const SkString & SVGTextBuilder::posX ( ) const
inline

Definition at line 1061 of file SkSVGDevice.cpp.

1061{ return fPosXStr; }

◆ posY()

const SkString & SVGTextBuilder::posY ( ) const
inline

Definition at line 1062 of file SkSVGDevice.cpp.

1062{ return fHasConstY ? fConstYStr : fPosYStr; }

◆ text()

const SkString & SVGTextBuilder::text ( ) const
inline

Definition at line 1060 of file SkSVGDevice.cpp.

1060{ return fText; }

The documentation for this class was generated from the following file: