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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T00:14:43+00:00 2026-06-11T00:14:43+00:00

i have been using cleardevice() to clear the graphics … but it creates several

  • 0

i have been using cleardevice() to clear the graphics … but it creates several problems

for eg .. i create a background but i have to clear some specific elements , then i have to use another user defined function drawb() which draws the background and simultaneously cleardevice();
creating a lot of problems

line(x,y,x1,y1);   //suppose this line is to be erased 
                   //but using cleardevice even clears the background   
cleardevice();
drawb();  //to draw board or background

so i want to know an alternative approach(an approach to clear only the line not the background) (if it exists )

  • 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-11T00:14:45+00:00Added an answer on June 11, 2026 at 12:14 am

    Once a line is drawn, there is no real way to remove it (except if you are drawing using XOR mode!). However, there are some thing you could do. You could render everything but the line in a page and store it there. Then, in another page you render everything, including the line. So if you want to undo the line, you just switch the page back.

    An example:

    setactivepage(0);
    // draw stuff, including background
    setactivepage(1);
    // draw stuff, including background and line
    setvisualpage(0); // no line visible
    setvisualpage(1); // line visible
    

    Also, if you want to reset the screen with a background, there is no need to do a cleardevice(), since the drawb() overwrites every pixel ayway.

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

Sidebar

Related Questions

I have been using some Javascript to create a text field once an certain
I have been using the python logging module for quite some time now, but
I have been using TortoiseSVN for some time and I really like it. I
I have been using an API to do some work. This is how I
I have been using echo $.sprintf(%01\$.2f,$numvar); for my USD formatting, but I only copied
I have been using json.NET successfully in projects for some time now without any
I have been using HTML4 for quite some time. I've heard of HTML5 for
I have been using NSUserDefaults for passing floats all around my apps. But they
I have been using Javascript but more in a procedural way not the object
I have been using Maven for several months to build using Artifactory for the

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.