Lines Matching full:glyph
223 SkScalerContext* SkScalerContext::getGlyphContext(const SkGlyph& glyph) {
224 unsigned glyphID = glyph.getGlyphID();
234 SkDebugf("--- no context for glyph %x\n", glyph.getGlyphID());
255 return 0; // no more contexts, return missing glyph
282 void SkScalerContext::getAdvance(SkGlyph* glyph) {
284 glyph->fMaskFormat = MASK_FORMAT_JUST_ADVANCE;
288 this->getGlyphContext(*glyph)->generateAdvance(glyph);
291 void SkScalerContext::getMetrics(SkGlyph* glyph) {
292 this->getGlyphContext(*glyph)->generateMetrics(glyph);
300 glyph->fLsbDelta = glyph->fRsbDelta = 0;
303 // if either dimension is empty, zap the image bounds of the glyph
304 if (0 == glyph->fWidth || 0 == glyph->fHeight) {
305 glyph->fWidth = 0;
306 glyph->fHeight = 0;
307 glyph->fTop = 0;
308 glyph->fLeft = 0;
309 glyph->fMaskFormat = 0;
317 this->internalGetPath(*glyph, &fillPath, &devPath, &fillToDevMatrix);
325 glyph->fLeft = mask.fBounds.fLeft;
326 glyph->fTop = mask.fBounds.fTop;
327 glyph->fWidth = SkToU16(mask.fBounds.width());
328 glyph->fHeight = SkToU16(mask.fBounds.height());
340 glyph->fLeft = ir.fLeft;
341 glyph->fTop = ir.fTop;
342 glyph->fWidth = SkToU16(ir.width());
343 glyph->fHeight = SkToU16(ir.height());
347 glyph->fMaskFormat = fRec.fMaskFormat;
353 glyph->toMask(&src);
359 glyph->fLeft = dst.fBounds.fLeft;
360 glyph->fTop = dst.fBounds.fTop;
361 glyph->fWidth = SkToU16(dst.fBounds.width());
362 glyph->fHeight = SkToU16(dst.fBounds.height());
363 glyph->fMaskFormat = dst.fFormat;
370 glyph->fLeft = 0;
371 glyph->fTop = 0;
372 glyph->fWidth = 0;
373 glyph->fHeight = 0;
376 glyph->fMaskFormat = fRec.fMaskFormat;
380 const SkGlyph* glyph = &origGlyph;
397 glyph = &tmpGlyph;
404 this->internalGetPath(*glyph, &fillPath, &devPath, &fillToDevMatrix);
412 glyph->toMask(&mask);
414 sk_bzero(glyph->fImage, mask.computeImageSize());
438 clip.setRect(0, 0, glyph->fWidth, glyph->fHeight);
439 matrix.setTranslate(-SkIntToScalar(glyph->fLeft),
440 -SkIntToScalar(glyph->fTop));
441 bm.setConfig(config, glyph->fWidth, glyph->fHeight,
442 glyph->rowBytes());
443 bm.setPixels(glyph->fImage);
444 sk_bzero(glyph->fImage, bm.height() * bm.rowBytes());
454 glyph->expandA8ToLCD();
456 this->getGlyphContext(*glyph)->generateImage(*glyph);
463 // the src glyph image shouldn't be 3D
464 SkASSERT(SkMask::k3D_Format != glyph->fMaskFormat);
465 glyph->toMask(&srcM);
482 // clean out our glyph, since it may be larger than dstM
516 void SkScalerContext::getPath(const SkGlyph& glyph, SkPath* path)
518 this->internalGetPath(glyph, NULL, path, NULL);
526 SkUnichar SkScalerContext::generateGlyphToChar(uint16_t glyph) {
532 void SkScalerContext::internalGetPath(const SkGlyph& glyph, SkPath* fillPath, SkPath* devPath, SkMatrix* fillToDevMatrix)
536 this->getGlyphContext(glyph)->generatePath(glyph, &path);
652 virtual void generateAdvance(SkGlyph* glyph) {
653 glyph->zeroMetrics();
655 virtual void generateMetrics(SkGlyph* glyph) {
656 glyph->zeroMetrics();
658 virtual void generateImage(const SkGlyph& glyph) {}
659 virtual void generatePath(const SkGlyph& glyph, SkPath* path) {}