Lines Matching refs:glyph

141 void Font::measureCachedGlyph(CachedGlyphInfo *glyph, int x, int y,  in measureCachedGlyph()  argument
143 int width = (int) glyph->mBitmapWidth; in measureCachedGlyph()
144 int height = (int) glyph->mBitmapHeight; in measureCachedGlyph()
146 int nPenX = x + glyph->mBitmapLeft; in measureCachedGlyph()
147 int nPenY = y + glyph->mBitmapTop; in measureCachedGlyph()
163 void Font::drawCachedGlyph(CachedGlyphInfo* glyph, int x, int y, in drawCachedGlyph() argument
165 float width = (float) glyph->mBitmapWidth; in drawCachedGlyph()
166 float height = (float) glyph->mBitmapHeight; in drawCachedGlyph()
168 float nPenX = x + glyph->mBitmapLeft; in drawCachedGlyph()
169 float nPenY = y + glyph->mBitmapTop + height; in drawCachedGlyph()
171 float u1 = glyph->mBitmapMinU; in drawCachedGlyph()
172 float u2 = glyph->mBitmapMaxU; in drawCachedGlyph()
173 float v1 = glyph->mBitmapMinV; in drawCachedGlyph()
174 float v2 = glyph->mBitmapMaxV; in drawCachedGlyph()
179 nPenX, nPenY - height, u1, v1, glyph->mCacheTexture); in drawCachedGlyph()
182 void Font::drawCachedGlyphTransformed(CachedGlyphInfo* glyph, int x, int y, in drawCachedGlyphTransformed() argument
184 float width = (float) glyph->mBitmapWidth; in drawCachedGlyphTransformed()
185 float height = (float) glyph->mBitmapHeight; in drawCachedGlyphTransformed()
188 p[0].iset(glyph->mBitmapLeft, glyph->mBitmapTop + height); in drawCachedGlyphTransformed()
189 p[1].iset(glyph->mBitmapLeft + width, glyph->mBitmapTop + height); in drawCachedGlyphTransformed()
190 p[2].iset(glyph->mBitmapLeft + width, glyph->mBitmapTop); in drawCachedGlyphTransformed()
191 p[3].iset(glyph->mBitmapLeft, glyph->mBitmapTop); in drawCachedGlyphTransformed()
200 float u1 = glyph->mBitmapMinU; in drawCachedGlyphTransformed()
201 float u2 = glyph->mBitmapMaxU; in drawCachedGlyphTransformed()
202 float v1 = glyph->mBitmapMinV; in drawCachedGlyphTransformed()
203 float v2 = glyph->mBitmapMaxV; in drawCachedGlyphTransformed()
209 p[3].x(), p[3].y(), u1, v1, glyph->mCacheTexture); in drawCachedGlyphTransformed()
212 void Font::drawCachedGlyphBitmap(CachedGlyphInfo* glyph, int x, int y, uint8_t* bitmap, in drawCachedGlyphBitmap() argument
214 int dstX = x + glyph->mBitmapLeft; in drawCachedGlyphBitmap()
215 int dstY = y + glyph->mBitmapTop; in drawCachedGlyphBitmap()
217 CacheTexture* cacheTexture = glyph->mCacheTexture; in drawCachedGlyphBitmap()
224 uint32_t startY = glyph->mStartY * srcStride; in drawCachedGlyphBitmap()
225 uint32_t endY = startY + (glyph->mBitmapHeight * srcStride); in drawCachedGlyphBitmap()
233 … memcpy(&bitmap[bitmapY + dstX], &cacheBuffer[cacheY + glyph->mStartX], glyph->mBitmapWidth); in drawCachedGlyphBitmap()
235 for (uint32_t i = 0; i < glyph->mBitmapWidth; ++i) { in drawCachedGlyphBitmap()
236 …bitmap[bitmapY + dstX + i] = cacheBuffer[cacheY + (glyph->mStartX + i)*formatSize + alpha_channel_… in drawCachedGlyphBitmap()
243 void Font::drawCachedGlyph(CachedGlyphInfo* glyph, float x, float hOffset, float vOffset, in drawCachedGlyph() argument
245 const float halfWidth = glyph->mBitmapWidth * 0.5f; in drawCachedGlyph()
246 const float height = glyph->mBitmapHeight; in drawCachedGlyph()
248 vOffset += glyph->mBitmapTop + height; in drawCachedGlyph()
251 bool ok = measure.getPosTan(x + hOffset + glyph->mBitmapLeft + halfWidth, position, tangent); in drawCachedGlyph()
266 const float u1 = glyph->mBitmapMinU; in drawCachedGlyph()
267 const float u2 = glyph->mBitmapMaxU; in drawCachedGlyph()
268 const float v1 = glyph->mBitmapMinV; in drawCachedGlyph()
269 const float v2 = glyph->mBitmapMaxV; in drawCachedGlyph()
280 glyph->mCacheTexture); in drawCachedGlyph()
335 glyph_t glyph = GET_GLYPH(text); in render() local
337 if (IS_END_OF_STRING(glyph)) { in render()
341 CachedGlyphInfo* cachedGlyph = getCachedGlyph(paint, glyph); in render()
374 glyph_t glyph = GET_GLYPH(text); in precache() local
377 if (IS_END_OF_STRING(glyph)) { in precache()
381 CachedGlyphInfo* cachedGlyph = getCachedGlyph(paint, glyph, true); in precache()
409 glyph_t glyph = GET_GLYPH(text); in render() local
412 if (IS_END_OF_STRING(glyph)) { in render()
416 CachedGlyphInfo* cachedGlyph = getCachedGlyph(paint, glyph); in render()
433 SkGlyphCache* skiaGlyphCache, CachedGlyphInfo* glyph, bool precaching) { in updateGlyphCache() argument
434 glyph->mAdvanceX = skiaGlyph.fAdvanceX; in updateGlyphCache()
435 glyph->mAdvanceY = skiaGlyph.fAdvanceY; in updateGlyphCache()
436 glyph->mBitmapLeft = skiaGlyph.fLeft; in updateGlyphCache()
437 glyph->mBitmapTop = skiaGlyph.fTop; in updateGlyphCache()
438 glyph->mLsbDelta = skiaGlyph.fLsbDelta; in updateGlyphCache()
439 glyph->mRsbDelta = skiaGlyph.fRsbDelta; in updateGlyphCache()
448 mState->cacheBitmap(skiaGlyph, glyph, &startX, &startY, precaching); in updateGlyphCache()
450 if (!glyph->mIsValid) { in updateGlyphCache()
457 glyph->mStartX = startX; in updateGlyphCache()
458 glyph->mStartY = startY; in updateGlyphCache()
459 glyph->mBitmapWidth = skiaGlyph.fWidth; in updateGlyphCache()
460 glyph->mBitmapHeight = skiaGlyph.fHeight; in updateGlyphCache()
464 uint32_t cacheWidth = glyph->mCacheTexture->getWidth(); in updateGlyphCache()
465 uint32_t cacheHeight = glyph->mCacheTexture->getHeight(); in updateGlyphCache()
467 glyph->mBitmapMinU = startX / (float) cacheWidth; in updateGlyphCache()
468 glyph->mBitmapMinV = startY / (float) cacheHeight; in updateGlyphCache()
469 glyph->mBitmapMaxU = endX / (float) cacheWidth; in updateGlyphCache()
470 glyph->mBitmapMaxV = endY / (float) cacheHeight; in updateGlyphCache()
476 CachedGlyphInfo* Font::cacheGlyph(const SkPaint* paint, glyph_t glyph, bool precaching) { in cacheGlyph() argument
478 mCachedGlyphs.add(glyph, newGlyph); in cacheGlyph()
481 const SkGlyph& skiaGlyph = GET_METRICS(autoCache.getCache(), glyph); in cacheGlyph()