Lines Matching defs:cg
97 CGContextRef cg = (CGContextRef)fCanvas->accessTopRasterHandle();
104 CGContextSetFillColorWithColor(cg, color);
105 CGContextFillRect(cg, CGRectMake(r.x(), r.y(), r.width(), r.height()));
109 static CGAffineTransform matrix_to_transform(CGContextRef cg, const SkMatrix& ctm) {
112 matrix.postTranslate(0, SkIntToScalar(CGBitmapContextGetHeight(cg)));
129 CGContextRef cg = SkCreateCGContext(SkPixmap(info, nullptr, 0));
130 if (!cg) {
134 rec->fReleaseCtx = cg;
135 rec->fPixels = CGBitmapContextGetData(cg);
136 rec->fRowBytes = CGBitmapContextGetBytesPerRow(cg);
137 rec->fHandle = cg;
138 CGContextSaveGState(cg); // balanced each time updateHandle is called
143 CGContextRef cg = (CGContextRef)hndl;
145 CGContextRestoreGState(cg);
146 CGContextSaveGState(cg);
147 CGContextClipToRect(cg, CGRectMake(clip.x(), clip.y(), clip.width(), clip.height()));
148 CGContextConcatCTM(cg, matrix_to_transform(cg, ctm));