becky
unread,Sep 1, 2011, 9:51:17 AM9/1/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to skia-discuss
I use skia to draw large rectangle with gradient effect, however, the
effect is not natural.
when the rectangle is small, the effect is good.
why?? do I use the API wrong?
Code is as follows.
SkPoint center;
center.set(160,240);
SkColor color[2];
color[0]=SkColorSetARGB(255,0,0,0);
color[1]=SkColorSetARGB(255,255,255,255);
SkShader *sh=SkGradientShader::CreateRadial(center,100,color,NULL,
2,SkShader::kClamp_TileMode,NULL);
SkPaint paint;
paint.setShader(sh);
SkRect r;
r.set(0, 0, 320, 480);
canv->drawRect(r, paint);