Lines Matching refs:paint
22 static bool setFont(SkPaint* paint, const char name[]) { in setFont() argument
25 paint->setTypeface(tf)->unref(); in setFont()
55 SkPaint paint; in drawGrad() local
56 paint.setShader(s)->unref(); in drawGrad()
58 canvas->drawRect(r, paint); in drawGrad()
74 SkPaint paint; in onDraw() local
75 setFont(&paint, "Times"); in onDraw()
76 paint.setTextSize(SkIntToScalar(16)); in onDraw()
77 paint.setAntiAlias(true); in onDraw()
78 paint.setLCDRenderText(true); in onDraw()
82 paint.setColor(fg[i]); in onDraw()
87 canvas->drawText(text, len, x, y, paint); in onDraw()
88 y += paint.getTextSize() * 2; in onDraw()
110 static void set_face(SkPaint* paint) { in set_face() argument
112 SkSafeUnref(paint->setTypeface(face)); in set_face()
115 static void draw_pair(SkCanvas* canvas, SkPaint* paint, SkShader* shader) { in draw_pair() argument
119 paint->setShader(NULL); in draw_pair()
120 canvas->drawText(text, len, 10, 20, *paint); in draw_pair()
121 paint->setShader(SkShader::CreateColorShader(paint->getColor()))->unref(); in draw_pair()
122 canvas->drawText(text, len, 10, 40, *paint); in draw_pair()
123 paint->setShader(shader); in draw_pair()
124 canvas->drawText(text, len, 10, 60, *paint); in draw_pair()
162 SkPaint paint; in onDraw() local
163 paint.setAntiAlias(true); in onDraw()
164 paint.setLCDRenderText(true); in onDraw()
165 paint.setTextSize(18); in onDraw()
166 set_face(&paint); in onDraw()
169 paint.setColor(fColors[i]); in onDraw()
170 draw_pair(canvas, &paint, fShaders[i]); in onDraw()