Lines Matching refs:glyph

135 void Font::measureCachedGlyph(CachedGlyphInfo *glyph, int x, int y,  in measureCachedGlyph()  argument
137 int width = (int) glyph->mBitmapWidth; in measureCachedGlyph()
138 int height = (int) glyph->mBitmapHeight; in measureCachedGlyph()
140 int nPenX = x + glyph->mBitmapLeft; in measureCachedGlyph()
141 int nPenY = y + glyph->mBitmapTop; in measureCachedGlyph()
157 void Font::drawCachedGlyph(CachedGlyphInfo* glyph, int x, int y, in drawCachedGlyph() argument
159 float width = (float) glyph->mBitmapWidth; in drawCachedGlyph()
160 float height = (float) glyph->mBitmapHeight; in drawCachedGlyph()
162 float nPenX = x + glyph->mBitmapLeft; in drawCachedGlyph()
163 float nPenY = y + glyph->mBitmapTop + height; in drawCachedGlyph()
165 float u1 = glyph->mBitmapMinU; in drawCachedGlyph()
166 float u2 = glyph->mBitmapMaxU; in drawCachedGlyph()
167 float v1 = glyph->mBitmapMinV; in drawCachedGlyph()
168 float v2 = glyph->mBitmapMaxV; in drawCachedGlyph()
173 nPenX, nPenY - height, u1, v1, glyph->mCacheTexture); in drawCachedGlyph()
176 void Font::drawCachedGlyphTransformed(CachedGlyphInfo* glyph, int x, int y, in drawCachedGlyphTransformed() argument
178 float width = (float) glyph->mBitmapWidth; in drawCachedGlyphTransformed()
179 float height = (float) glyph->mBitmapHeight; in drawCachedGlyphTransformed()
182 p[0].iset(glyph->mBitmapLeft, glyph->mBitmapTop + height); in drawCachedGlyphTransformed()
183 p[1].iset(glyph->mBitmapLeft + width, glyph->mBitmapTop + height); in drawCachedGlyphTransformed()
184 p[2].iset(glyph->mBitmapLeft + width, glyph->mBitmapTop); in drawCachedGlyphTransformed()
185 p[3].iset(glyph->mBitmapLeft, glyph->mBitmapTop); in drawCachedGlyphTransformed()
194 float u1 = glyph->mBitmapMinU; in drawCachedGlyphTransformed()
195 float u2 = glyph->mBitmapMaxU; in drawCachedGlyphTransformed()
196 float v1 = glyph->mBitmapMinV; in drawCachedGlyphTransformed()
197 float v2 = glyph->mBitmapMaxV; in drawCachedGlyphTransformed()
203 p[3].x(), p[3].y(), u1, v1, glyph->mCacheTexture); in drawCachedGlyphTransformed()
206 void Font::drawCachedGlyphBitmap(CachedGlyphInfo* glyph, int x, int y, uint8_t* bitmap, in drawCachedGlyphBitmap() argument
208 int dstX = x + glyph->mBitmapLeft; in drawCachedGlyphBitmap()
209 int dstY = y + glyph->mBitmapTop; in drawCachedGlyphBitmap()
211 CacheTexture* cacheTexture = glyph->mCacheTexture; in drawCachedGlyphBitmap()
218 uint32_t startY = glyph->mStartY * srcStride; in drawCachedGlyphBitmap()
219 uint32_t endY = startY + (glyph->mBitmapHeight * srcStride); in drawCachedGlyphBitmap()
226 for (uint32_t i = 0; i < glyph->mBitmapWidth; ++i) { in drawCachedGlyphBitmap()
229 cacheY + (glyph->mStartX + i)*formatSize + alpha_channel_offset]; in drawCachedGlyphBitmap()
237 void Font::drawCachedGlyph(CachedGlyphInfo* glyph, float x, float hOffset, float vOffset, in drawCachedGlyph() argument
239 const float halfWidth = glyph->mBitmapWidth * 0.5f; in drawCachedGlyph()
240 const float height = glyph->mBitmapHeight; in drawCachedGlyph()
242 vOffset += glyph->mBitmapTop + height; in drawCachedGlyph()
245 bool ok = measure.getPosTan(x + hOffset + glyph->mBitmapLeft + halfWidth, position, tangent); in drawCachedGlyph()
260 const float u1 = glyph->mBitmapMinU; in drawCachedGlyph()
261 const float u2 = glyph->mBitmapMaxU; in drawCachedGlyph()
262 const float v1 = glyph->mBitmapMinV; in drawCachedGlyph()
263 const float v2 = glyph->mBitmapMaxV; in drawCachedGlyph()
274 glyph->mCacheTexture); in drawCachedGlyph()
328 glyph_t glyph = *(glyphs++); in render() local
330 if (IS_END_OF_STRING(glyph)) { in render()
334 CachedGlyphInfo* cachedGlyph = getCachedGlyph(paint, glyph); in render()
365 glyph_t glyph = *(glyphs++); in precache() local
368 if (IS_END_OF_STRING(glyph)) { in precache()
372 getCachedGlyph(paint, glyph, true); in precache()
397 glyph_t glyph = *(glyphs++); in render() local
400 if (IS_END_OF_STRING(glyph)) { in render()
404 CachedGlyphInfo* cachedGlyph = getCachedGlyph(paint, glyph); in render()
427 SkGlyphCache* skiaGlyphCache, CachedGlyphInfo* glyph, bool precaching) { in updateGlyphCache() argument
428 glyph->mAdvanceX = skiaGlyph.fAdvanceX; in updateGlyphCache()
429 glyph->mAdvanceY = skiaGlyph.fAdvanceY; in updateGlyphCache()
430 glyph->mBitmapLeft = skiaGlyph.fLeft; in updateGlyphCache()
431 glyph->mBitmapTop = skiaGlyph.fTop; in updateGlyphCache()
432 glyph->mLsbDelta = skiaGlyph.fLsbDelta; in updateGlyphCache()
433 glyph->mRsbDelta = skiaGlyph.fRsbDelta; in updateGlyphCache()
442 mState->cacheBitmap(skiaGlyph, glyph, &startX, &startY, precaching); in updateGlyphCache()
444 if (!glyph->mIsValid) { in updateGlyphCache()
451 glyph->mStartX = startX; in updateGlyphCache()
452 glyph->mStartY = startY; in updateGlyphCache()
453 glyph->mBitmapWidth = skiaGlyph.fWidth; in updateGlyphCache()
454 glyph->mBitmapHeight = skiaGlyph.fHeight; in updateGlyphCache()
458 uint32_t cacheWidth = glyph->mCacheTexture->getWidth(); in updateGlyphCache()
459 uint32_t cacheHeight = glyph->mCacheTexture->getHeight(); in updateGlyphCache()
461 glyph->mBitmapMinU = startX / (float) cacheWidth; in updateGlyphCache()
462 glyph->mBitmapMinV = startY / (float) cacheHeight; in updateGlyphCache()
463 glyph->mBitmapMaxU = endX / (float) cacheWidth; in updateGlyphCache()
464 glyph->mBitmapMaxV = endY / (float) cacheHeight; in updateGlyphCache()
470 CachedGlyphInfo* Font::cacheGlyph(const SkPaint* paint, glyph_t glyph, bool precaching) { in cacheGlyph() argument
472 mCachedGlyphs.add(glyph, newGlyph); in cacheGlyph()
476 const SkGlyph& skiaGlyph = GET_METRICS(autoCache.getCache(), glyph); in cacheGlyph()