Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
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 1048 of file SkSVGDevice.cpp.

Constructor & Destructor Documentation

◆ SVGTextBuilder()

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

Definition at line 1050 of file SkSVGDevice.cpp.

1051 : fOrigin(origin) {
1052 auto runSize = glyphRun.runSize();
1053 AutoSTArray<64, SkUnichar> unichars(runSize);
1054 SkFontPriv::GlyphsToUnichars(glyphRun.font(), glyphRun.glyphsIDs().data(),
1055 runSize, unichars.get());
1056 auto positions = glyphRun.positions();
1057 for (size_t i = 0; i < runSize; ++i) {
1058 this->appendUnichar(unichars[i], positions[i]);
1059 }
1060 }
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 1063 of file SkSVGDevice.cpp.

1063{ return fPosXStr; }

◆ posY()

const SkString & SVGTextBuilder::posY ( ) const
inline

Definition at line 1064 of file SkSVGDevice.cpp.

1064{ return fHasConstY ? fConstYStr : fPosYStr; }

◆ text()

const SkString & SVGTextBuilder::text ( ) const
inline

Definition at line 1062 of file SkSVGDevice.cpp.

1062{ return fText; }

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