effect of these two charts , seeking advice how to achieve great God , especially the first one , so hard ! ! !
------ Solution ---------------------------------------- ----
rewrite onDraw method
which calls
RadialGradient class try
I just did a straight line , did not make this round
@Override
protected void onDraw(Canvas canvas) {
super.onDraw(canvas);
mRect = new Rect();
mRect.set(0, 0, showwidth, height);
Paint p=new Paint();
int color1 = Color.parseColor("#f1c40f");
int color2 = Color.parseColor("#f39c12");
// int rgb1 = Color.rgb(1, 1, 1);
// int rgb2 = Color.rgb(1, 1, 1);
// LinearGradient lg=new LinearGradient(0,0,screenWidth,0,color1,color2,TileMode.CLAMP); //
RadialGradient rg=new RadialGradient(x, y, radius, color0, color1, tile);
p.setShader(rg);
canvas.drawRect(mRect, p);
}
------ eference ------------------------------------- -
amount , draw a piece of fan- out, but how the mess needs to be studied figure !!!!!
------ eference ---------- -----------------------------
that I have to learn
------ eference - -------------------------------------
amount , draw a piece of fan- out, but how the mess needs to be studied figure ! ! ! ! !
you can think about, which is drawn out of a fan ,
then I can put a figure to cut into this sector .
So if in the middle of this picture is the transparent color , then,
renderings that is wanted.
Of course , this is just my idea, I do not know how they are doing.
------ eference --------------------------------------- < br>
amount , draw a piece of fan- out, but how the mess needs to be studied figure ! ! ! ! !
you can think about, which is drawn out of a fan ,
then I can put a figure to cut into this sector .
So if in the middle of this picture is the transparent color , then,
renderings that is wanted.
Of course , this is just my idea, I do not know how they are doing.
hey , study it slowly ! ! ! ! ! !
Thank you !
没有评论:
发表评论