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 9160499
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T13:45:14+00:00 2026-06-17T13:45:14+00:00

Is it possible to create ovals/ellipses with nicer strokes that have not that blurred

  • 0

Is it possible to create ovals/ellipses with nicer strokes that have not that “blurred” border similar to:

  • http://www.html5canvastutorials.com/kineticjs/html5-canvas-kineticjs-ellipse-tutorial/
  • http://www.html5canvastutorials.com/advanced/html5-canvas-ovals/

Can I somehow create more clear stroke line around the oval, or do I have to live with that “blurred” border?
enter image description here

  • 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-17T13:45:15+00:00Added an answer on June 17, 2026 at 1:45 pm

    ! you can do it ! by doing post-processing :

    1) Using globalCompositeOperation :

    Edit :
    yes, but no : on Chrome at least, ‘destination-in’ does not
    match the specifications : the source is used to compute destination
    color, so we cannot have single color from a shaded one.
    ( i did a try on JSBin : http://jsbin.com/ecipiq/4/ )

    OR

    2) Using getImageData and performance Array :

    • draw border in a temp canvas
    • getImageData of the canvas
    • get a Uint32Array or Uint8Array view on underlying data
    • loop linearly within array : if value > threshold set it to border color
    • draw the fill of the ellipse on target canvas
    • putImageData on target canvas.

    Which one ?

    • Second one does not require globalCompositeOperation to work.
      But on most browsers (all ?) get/put ImageData are slow as hell, this fact
      alone might invalidate this solution.
      The nice thing is you can precisely decide how to un-antialias.

    Other StackOverflow members might have insight on all this.

    Any of those solution will be much faster than a hand-written non-aliased
    ellipse function.

    usefull link for first solution :
    http://www.html5rocks.com/en/tutorials/webgl/typed_arrays/

    Remarks to get you started faster :
    You can get a UInt32Array view on your ImageData with :

    var myGetImageData = myTempCanvas.getImageData(0,0,sizeX, sizeY);
    sourceBuffer32     = new UInt32Array(myGetImageData.data.buffer);
    

    then sourceBuffer32[i] contains Red, Green, Blue, and transparency packed into one
    unsigned 32 bit int. Compare it to 0 to know if pixel is non-black ( != (0,0,0,0) )

    OR you can be more precise with a Uint8Array view :

    var myGetImageData = myTempCanvas.getImageData(0,0,sizeX, sizeY);
    sourceBuffer8     = new Uint8Array(myGetImageData.data.buffer);
    

    If you deal only with shades of grey, then R=G=B, so watch for

    sourceBuffer8[4*i]>Threshold
    

    and you can set the i-th pixel to black in one time using the UInt32Array view :

    sourceBuffer32[i]=(255<<24)||(255<<16)||(255<<8);
    

    You’ll surely be able to figure out how to deal with other colors than grey/black out of this example.

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

Sidebar

Related Questions

Possible Duplicate: Create an alert on any view controller after Facebook request:didFailWithError: I have
Is this possible: Create a draggable element so that when it is dragged over
Possible Duplicate: Create a date with T-SQL I've a data table that stores each
Is it possible to create a table with a column that combines two column
Possible Duplicate: Create WPF TextBox that accepts only numbers How i can check if
Possible Duplicate: Create Browser-Bookmark from app I have tried to create a bookmark for
I would like to know, that is it possible create own google chrome installer
Possible Duplicate: Create Items from 3 collections using Linq I have performed a zippage
Is possible create (register) a new class in runtime using delphi. I have a
Possible Duplicate: Create a variable in .CSS file for use within that .CSS file

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.