Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7710723
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T01:11:48+00:00 2026-06-01T01:11:48+00:00

I am trying to create an Oval Bitmap and I need to get a

  • 0

I am trying to create an Oval Bitmap and I need to get a feather effect around the margins,

Does anyone have any idea How I can achieve this ?

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T01:11:50+00:00Added an answer on June 1, 2026 at 1:11 am

    You could consider the ‘feather effect’ as a gradial gradient, with the alpha fading from 100% to 0%.

    Android offers the RadialGradient class for this purpose. You’ll want to use the constructor where you can specify the control points for the radient, as you’ll want the fading to start near the edge, not in the middle.

    The one problem with Android’s RadialGradient class is that it only supports perfect circles, not for ovals. To compensate for this, we’ll just draw a perfect circle and scale afterwards.

    Example code:

        private Bitmap makeFeatheredOval(int width, int height) { 
    
            // Determine largest dimension, use for rectangle.
            int size = Math.max( width, height);
    
            RadialGradient gradient = new RadialGradient(size / 2, size / 2, size / 2, 
                new int[] {0xFFFFFFFF, 0xFFFFFFFF, 0x00FFFFFF},
                new float[] {0.0f, 0.8f, 1.0f}, 
                android.graphics.Shader.TileMode.CLAMP); 
            Paint paint = new Paint(); 
            paint.setShader(gradient); 
    
            Bitmap bitmap = Bitmap.createBitmap(size, size, Config.ARGB_8888); 
            Canvas canvas = new Canvas(bitmap); 
            canvas.drawCircle(size / 2, size / 2, size / 2, paint);
    
            // Scale the bitmap, creating an oval
            bitmap = Bitmap.createScaledBitmap(bitmap, width, height, true);
    
            return bitmap; 
        }
    

    Example image (it’s the oval “moon” in the upper left corner):

    Oval circle overlayed on demoscene awesomeness

    Bonus points for everyone who recognizes that backdrop image.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Trying to create a QtRuby application, I get the following error: /usr/lib64/ruby/site_ruby/1.8/Qt/qtruby4.rb:2144: [BUG] Segmentation
hi I'm trying create chat using node.js I see example in http://chat.nodejs.org/ I have
I'm trying create a RCP Application with Eclipse, but I can't get past the
I'm trying create a ASMX webservice that can perform a HTTP GET request. I
I'm trying create this function such that if any key besides any of the
I'm trying create a gantt chart with highcharts and I need to put the
I am trying create the image enlargement effect when you hover your mouse over
I am trying create a data.frame from which to create a graph. I have
I am trying create a WCF Data Services ServiceOperation that does grouping on the
I trying create a responsive site and need see where is page break in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.