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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T23:14:19+00:00 2026-06-02T23:14:19+00:00

It appears the only way to clear a region from a canvas is to

  • 0

It appears the only way to clear a region from a canvas is to use the clearRect() command – I need to clear a circle (I am masking out areas from a filled canvas, point lights in this specific case) and despite all attempts it does not seem possible.

I tried drawing a circle with an alpha value of 0 but simply nothing would appear unless the alpha was higher (which is counter to the point :P) – I assume because a contex.fill() draws it as an add rather than a replace.

Any suggestions on how I might be able to (quickly) clear circles for mask purposes?

  • 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-02T23:14:21+00:00Added an answer on June 2, 2026 at 11:14 pm

    Use .arc to create a circular stroke and then use .clip() to make that the current clipping region.

    Then you can use .clearRect() to erase the whole canvas, but only the clipped area will change.

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

Sidebar

Related Questions

Is there a clear or easy way to check over the command line if
It would appear that FileReference.upload() is the only way in which you can upload
Is there a way to get some text to appear only when the [draft]
When i'm trying to resize datagridview columns the resize cursor appears only when i
We have this bug that only appears 30% of the time for the Release
The simple curve in this application only appears when it's dragged off the screen,
I'm trying to cache a price value using HttpRuntime.Cache.Insert(), but only appears to hold
For some reason, the Server control menu disappeared. The only menu appears on the
It appears the class constants only cover PDO::PARAM_BOOL , PDO::PARAM_INT and PDO::PARAM_STR for binding.
it appears that the Apple site now only provides download for Xcode 3.2, that

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.