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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T17:26:31+00:00 2026-05-11T17:26:31+00:00

My core graphics fills are acting strange when the get close together, touching or

  • 0

My core graphics fills are acting strange when the get close together, touching or overlapping. This issue is on the iPhone Simulator and iPhone OS 2.2.

Here we have two labels and a custom view with two CGContextFillRect():

overlap problem

When the blue and red are brought together they develop this irritating .5px merging line.
I can’t seem to get rid of this, or even change its colour.

This version has a 1px gap between the rectangles and it is of course filled with the background black:

pixel gap

I’ve tried disabling anti-aliasing but that doesn’t fix the issue.

- (void)drawRect:(CGRect)rect {
CGContextRef context = UIGraphicsGetCurrentContext();

CGContextSetAllowsAntialiasing(context, false);

CGContextSetRGBFillColor(context, 0.0, 0.0, 1.0, 1.0);
CGContextFillRect(context, CGRectMake(20.0, 35.0 + 40 + 20 , 100, 40));

CGContextSetRGBFillColor(context, 1.0, 0.0, 0.0, 1.0);
CGContextFillRect(context, CGRectMake(20.0 + 100 , 35.0 + 40 + 20 , 100, 40));

CGContextSetAllowsAntialiasing(context, true);

}

Any ideas?

  • 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-11T17:26:31+00:00Added an answer on May 11, 2026 at 5:26 pm

    There’s no defect. It’s an optical illusion. Your eye is integrating the R&B values close together and inferring the white overlap.

    Have a look at the graphics with pixie (part of Xcode) or xscope (a paid upgrade from iconfactory).

    http://www.freeimagehosting.net/uploads/th.e015daef50.png>

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

Sidebar

Related Questions

How to draw rectangle something like this in iphone sdk using core graphics
i am new to this core graphics or cv . I need a little
Can someone provide an example of drawing an iPhone-like turning wheel using Core Graphics
i want to draw a line in core graphics in iphone.I am using Quartz
I'm trying to bevel paths in core graphics. Has anyone done this already for
Using core graphics , I am trying to draw a line, in that when
I've just started with releasing in core graphics, so I might need a little
I am currently trying the Core Graphics 101: Glossy Buttons by RAYWENDERLICH, but I
So I created a custom text view using core graphics and have it conformed
I try to draw rain and snow as particle system using Core Graphics .

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.