[quote=“IanDMah”]Doing the challenge and it’s 'challenging’
No response to setLineWidth no matter what I set, it gives me just one pixel.
here is a code fragment. from drawRect:
[bezpath setLineWidth:[Oval mythickness]];
[[Oval mycolor] set];
NSRect TmpRec = [Oval myrect];
bezpath = [NSBezierPath bezierPathWithOvalInRect:TmpRec];
and I see the width is actually set to 3 or 6 depending on Random()
ps. works with a scribble path… tho … wha???[/quote]
Yeah that challenge is a tough one, honestly I stopped after I was able to draw multiple ovals…
But let’s get back to your problem, your code looks a little bit strange though
bezierPathWithOvalInRect:TmpRec]; // ?!
Anway, according to the Xcode documentation, bezierPathWithOvalInRect -> “Creates and returns a new NSBezierPath object initialized with an oval path inscribed in the specified rectangle.” So I guess your old bezpath and thus your lineWidth is overwritten, so try calling bezierPathWithOvalInRect first
PS: I don’t like this drawing stuff… I have a feeling we’re drawing the background and all the ovals each and every time (even if I just move the mouse a bit while holding LMB), this is so… unnecessary and wasteful IMHO and I really hope there’s a better way to do this