Lines Matching refs:cg
47 CGContextRef cg = CGBitmapContextCreate(bm.getPixels(), bm.width(), bm.height(), in makeCG() local
51 CGContextSetAllowsFontSubpixelQuantization(cg, false); in makeCG()
52 CGContextSetShouldSubpixelQuantizeFonts(cg, false); in makeCG()
54 return cg; in makeCG()
68 static void cgSetPaintForText(CGContextRef cg, const SkPaint& paint) { in cgSetPaintForText() argument
76 CGContextSetRGBFillColor(cg, rgba[0], rgba[1], rgba[2], rgba[3]); in cgSetPaintForText()
78 CGContextSetTextDrawingMode(cg, kCGTextFill); in cgSetPaintForText()
79 CGContextSetFont(cg, typefaceToCGFont(paint.getTypeface())); in cgSetPaintForText()
80 CGContextSetFontSize(cg, SkScalarToFloat(paint.getTextSize())); in cgSetPaintForText()
82 CGContextSetAllowsFontSubpixelPositioning(cg, paint.isSubpixelText()); in cgSetPaintForText()
83 CGContextSetShouldSubpixelPositionFonts(cg, paint.isSubpixelText()); in cgSetPaintForText()
85 CGContextSetShouldAntialias(cg, paint.isAntiAlias()); in cgSetPaintForText()
86 CGContextSetShouldSmoothFonts(cg, paint.isLCDRenderText()); in cgSetPaintForText()
89 static void cgDrawText(CGContextRef cg, const void* text, size_t len, in cgDrawText() argument
91 if (cg) { in cgDrawText()
92 cgSetPaintForText(cg, paint); in cgDrawText()
97 CGContextShowGlyphsAtPoint(cg, x, y, glyphs, count); in cgDrawText()
146 CGContextRef cg = makeCG(canvas->getDevice()->accessBitmap(false)); in onDraw() local
179 cgDrawText(cg, text, len, SkScalarToFloat(x), in onDraw()
189 CGContextRelease(cg); in onDraw()