class SkFontPriv {
public: /* This is the size we use when we ask for a glyph's path. We then *post-transformitaswedrawtomatchtherequest. *Thisisdonetotrytore-usecacheentriesforthepath. * *Thisvalueissomewhatarbitrary.Intheory,itcouldbe1,since *westorepathsasfloats.However,wegetthepathfromthefont *scaler,anditmayrepresentitspathsasfixed-point(or26.6), *soweshouldn'taskforsomethingtoobig(mightoverflow16.16) *ortoosmall(underflow26.6). * *ThisvaluecouldtrackkMaxSizeForGlyphCache,assumingtheabove *constraints,butsinceweaskforunhintedpaths,thetwovalues *neednotmatchper-se.
*/ inlinestatic constexpr int kCanonicalTextSizeForPaths = 64;
/** *Returnamatrixthatappliesthepaint'stextvalues:size,scale,skew
*/ static SkMatrix MakeTextMatrix(SkScalar size, SkScalar scaleX, SkScalar skewX) {
SkMatrix m = SkMatrix::Scale(size * scaleX, size); if (skewX) {
m.postSkew(skewX, 0);
} return m;
}
/** Return the approximate largest dimension of typical text when transformed by the matrix. * *@parammatrixusedtotransformsize *@paramtextLocationlocationofthetextpriortomatrixtransformation.Usedifthe *matrixhasperspective. *@returntypicallargestdimension
*/ static SkScalar ApproximateTransformedTextSize(const SkFont& font, const SkMatrix& matrix, const SkPoint& textLocation);
// Returns the number of elements (characters or glyphs) in the array. static size_t CountTextElements(constvoid* text, size_t byteLength, SkTextEncoding);
staticvoid GlyphsToUnichars(const SkFont&, const SkGlyphID glyphs[], int count, SkUnichar[]);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.