set Sweep Gradient Gradient Paint - Android Graphics

Android examples for Graphics:Paint

Description

set Sweep Gradient Gradient Paint

Demo Code


//package com.java2s;

import android.graphics.Paint;

import android.graphics.SweepGradient;

public class Main {
    protected static void setSweepGradientGradientPaint(Paint paint,
            float width, float height, int colorStart, int colorEnd) {
        paint.setShader(new SweepGradient(width, height, colorStart,
                colorEnd));//from   w  w  w. j a v a2s  .co m
        paint.setAntiAlias(true);
    }
}

Related Tutorials