Lines Matching defs:glyph

140 void Font::measureCachedGlyph(CachedGlyphInfo *glyph, int x, int y,
142 int width = (int) glyph->mBitmapWidth;
143 int height = (int) glyph->mBitmapHeight;
145 int nPenX = x + glyph->mBitmapLeft;
146 int nPenY = y + glyph->mBitmapTop;
162 void Font::drawCachedGlyph(CachedGlyphInfo* glyph, int x, int y,
164 float width = (float) glyph->mBitmapWidth;
165 float height = (float) glyph->mBitmapHeight;
167 float nPenX = x + glyph->mBitmapLeft;
168 float nPenY = y + glyph->mBitmapTop + height;
170 float u1 = glyph->mBitmapMinU;
171 float u2 = glyph->mBitmapMaxU;
172 float v1 = glyph->mBitmapMinV;
173 float v2 = glyph->mBitmapMaxV;
178 nPenX, nPenY - height, u1, v1, glyph->mCacheTexture);
181 void Font::drawCachedGlyphTransformed(CachedGlyphInfo* glyph, int x, int y,
183 float width = (float) glyph->mBitmapWidth;
184 float height = (float) glyph->mBitmapHeight;
187 p[0].iset(glyph->mBitmapLeft, glyph->mBitmapTop + height);
188 p[1].iset(glyph->mBitmapLeft + width, glyph->mBitmapTop + height);
189 p[2].iset(glyph->mBitmapLeft + width, glyph->mBitmapTop);
190 p[3].iset(glyph->mBitmapLeft, glyph->mBitmapTop);
199 float u1 = glyph->mBitmapMinU;
200 float u2 = glyph->mBitmapMaxU;
201 float v1 = glyph->mBitmapMinV;
202 float v2 = glyph->mBitmapMaxV;
208 p[3].x(), p[3].y(), u1, v1, glyph->mCacheTexture);
211 void Font::drawCachedGlyphBitmap(CachedGlyphInfo* glyph, int x, int y, uint8_t* bitmap,
213 int dstX = x + glyph->mBitmapLeft;
214 int dstY = y + glyph->mBitmapTop;
216 CacheTexture* cacheTexture = glyph->mCacheTexture;
223 uint32_t startY = glyph->mStartY * srcStride;
224 uint32_t endY = startY + (glyph->mBitmapHeight * srcStride);
231 for (uint32_t i = 0; i < glyph->mBitmapWidth; ++i) {
234 cacheY + (glyph->mStartX + i)*formatSize + alpha_channel_offset];
242 void Font::drawCachedGlyph(CachedGlyphInfo* glyph, float x, float hOffset, float vOffset,
244 const float halfWidth = glyph->mBitmapWidth * 0.5f;
245 const float height = glyph->mBitmapHeight;
247 vOffset += glyph->mBitmapTop + height;
250 bool ok = measure.getPosTan(x + hOffset + glyph->mBitmapLeft + halfWidth, position, tangent);
265 const float u1 = glyph->mBitmapMinU;
266 const float u2 = glyph->mBitmapMaxU;
267 const float v1 = glyph->mBitmapMinV;
268 const float v2 = glyph->mBitmapMaxV;
279 glyph->mCacheTexture);
285 // Is the glyph still in texture cache?
335 glyph_t glyph = GET_GLYPH(text);
337 if (IS_END_OF_STRING(glyph)) {
341 CachedGlyphInfo* cachedGlyph = getCachedGlyph(paint, glyph);
374 glyph_t glyph = GET_GLYPH(text);
377 if (IS_END_OF_STRING(glyph)) {
381 getCachedGlyph(paint, glyph, true);
407 glyph_t glyph = GET_GLYPH(text);
410 if (IS_END_OF_STRING(glyph)) {
414 CachedGlyphInfo* cachedGlyph = getCachedGlyph(paint, glyph);
431 SkGlyphCache* skiaGlyphCache, CachedGlyphInfo* glyph, bool precaching) {
432 glyph->mAdvanceX = skiaGlyph.fAdvanceX;
433 glyph->mAdvanceY = skiaGlyph.fAdvanceY;
434 glyph->mBitmapLeft = skiaGlyph.fLeft;
435 glyph->mBitmapTop = skiaGlyph.fTop;
436 glyph->mLsbDelta = skiaGlyph.fLsbDelta;
437 glyph->mRsbDelta = skiaGlyph.fRsbDelta;
442 // Get the bitmap for the glyph
446 mState->cacheBitmap(skiaGlyph, glyph, &startX, &startY, precaching);
448 if (!glyph->mIsValid) {
455 glyph->mStartX = startX;
456 glyph->mStartY = startY;
457 glyph->mBitmapWidth = skiaGlyph.fWidth;
458 glyph->mBitmapHeight = skiaGlyph.fHeight;
462 uint32_t cacheWidth = glyph->mCacheTexture->getWidth();
463 uint32_t cacheHeight = glyph->mCacheTexture->getHeight();
465 glyph->mBitmapMinU = startX / (float) cacheWidth;
466 glyph->mBitmapMinV = startY / (float) cacheHeight;
467 glyph->mBitmapMaxU = endX / (float) cacheWidth;
468 glyph->mBitmapMaxV = endY / (float) cacheHeight;
474 CachedGlyphInfo* Font::cacheGlyph(const SkPaint* paint, glyph_t glyph, bool precaching) {
476 mCachedGlyphs.add(glyph, newGlyph);
480 const SkGlyph& skiaGlyph = GET_METRICS(autoCache.getCache(), glyph);