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

  • Home
  • SEARCH
  • 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 6197163
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T03:46:18+00:00 2026-05-24T03:46:18+00:00

I have been making paint application and i have implemented successfully drawing with paint

  • 0

I have been making paint application and i have implemented successfully drawing with paint brush..My problem is I do not want color to be redrawn on the screen where color is already been painted..Have a look in screenshot..I am using OpenGl ES.. I tried to match screens pixels’ color with current brush’s color but I could not get it right..Can anyone tell me where i am going wrong?? Thanks..

Screenshot for probliem : http://imageshack.us/photo/my-images/842/screenshot20110726at601.png/

I am pasting my code here:

  - (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event
  {  

CGRect  bounds =[self bounds];
UITouch *touch = [[event touchesForView:self] anyObject];
//glDisable(GL_BLEND); 

  glEnable(GL_BLEND);     
  Byte pixel[4];
glReadPixels(location.x,location.y, 1, 1, GL_RGBA, GL_UNSIGNED_BYTE, &pixel);
NSLog(@"%d %d %d %d",pixel[0],pixel[1],pixel[2],pixel[3]);

r_comp=(float)pixel[0]/255;
g_comp=(float)pixel[1]/255;
b_comp=(float)pixel[2]/255;

artbrushAppDelegate *app=(artbrushAppDelegate *)[[UIApplication sharedApplication]delegate];

  if(r_comp==app.rg && g_comp==app.gg && b_comp==app.bg) 
 // app.rg,app.bg,app.gg are brush colors saved in global varable
{

    glEnable(GL_BLEND); 
}

else
{

    glDisable(GL_BLEND); 
}
  • 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-05-24T03:46:18+00:00Added an answer on May 24, 2026 at 3:46 am

    You can apply “layers” mechanism, where the paint is opaque but they layer as a whole is partly transparent.. I read it in forum somewhere..

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

Sidebar

Related Questions

I have been making a little toy web application in C# along the lines
I have been making a threaded comment system as a way to learn php
I'm relatively new to java (specifically swing) and have recently been making some fairly
I have been using the Rails console a fair bit lately and its making
I am making a game that needs a crosshair. I have been playing with
I work for a small OEM manufacturer and have been tasked with making some
Possible Duplicate: Java, GUI builder or hand coding? I have been making GUI hand-coded
I have recently been messing with form submission and I was making a Python
I really have a strange situation. I'm making a Linux multi-threaded C application using
Have been looking at the MVC storefront and see that IQueryable is returned from

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.