• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Stupid code or bug in NSBezierPath (or Quartz who knows ?)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Stupid code or bug in NSBezierPath (or Quartz who knows ?)


  • Subject: Stupid code or bug in NSBezierPath (or Quartz who knows ?)
  • From: Stéphane Sudre <email@hidden>
  • Date: Thu, 14 Jun 2001 16:22:32 +0200

Is it my eyes or there's a bug in the NSBezierPath or Quartz code (a big one) ?

I have a stupid custom subclass of NSView which is drawing some lines with the following code:

- (void) drawRect:(NSRect) frame
{
NSRect localFrame=[self frame];
NSGraphicsContext * tContext;

tContext=[NSGraphicsContext currentContext];

[tContext setShouldAntialias:NO]; // <- Antialiasing Off

[[NSColor blackColor] set];

// Remind me to post a bug report for the bug in the NSBezierPath Documentation + (void) setLineWidth doesn't exist.

[NSBezierPath setDefaultLineWidth:1.0]; // <- Line Width = 1 pixel

[NSBezierPath strokeRect:localFrame];

[NSBezierPath strokeLineFromPoint:NSMakePoint(0,0) toPoint:NSMakePoint(50,50)]; // To check Antialias is Off
}

And guess what I'm getting a frame rect and a line 2 pixels wide (using Pixie and my eyes).

So I tried with [NSBezierPath setDefaultLineWidth:0.5];

same result 2 pixels wide.

So I tried with [NSBezierPath setDefaultLineWidth:3];

and get 3 pixels wide

So I tried with [NSBezierPath setDefaultLineWidth:2];

and get 2 pixels wide

So I tried with [NSBezierPath setDefaultLineWidth:10];

and get 10 pixels wide

Any idea pointing to a bug on my side or should I begin readying my inflatable hammer ?


  • Follow-Ups:
    • Re: Stupid code or bug in NSBezierPath (or Quartz who knows ?)
      • From: Aki Inoue <email@hidden>
  • Prev by Date: NSSound
  • Next by Date: Re: Random Numbers
  • Previous by thread: Re: NSSound
  • Next by thread: Re: Stupid code or bug in NSBezierPath (or Quartz who knows ?)
  • Index(es):
    • Date
    • Thread