Re: NSSlider Cell drawing artifacts
Re: NSSlider Cell drawing artifacts
- Subject: Re: NSSlider Cell drawing artifacts
- From: Michael Hanna <email@hidden>
- Date: Tue, 27 Dec 2005 19:37:50 -0800
here is a pic of the artifacts:
http://img210.imageshack.us/img210/4092/artifacts5lw.jpg
yes, this is everything I overrode:
- (void)drawWithFrame:(NSRect)cellFrame inView:(NSView *)controlView
{
NSBezierPath *midMark;
[controlView lockFocus];
midMark = [NSBezierPath bezierPath];
[midMark moveToPoint:NSMakePoint(fKnobMid,cellFrame.size.height)];
[midMark lineToPoint:NSMakePoint(fKnobMid,cellFrame.origin.y)];
[midMark closePath];
[midMark fill];
[controlView unlockFocus];
[super drawWithFrame:cellFrame inView:controlView];
}
- (void)drawKnob:(NSRect)knobRect
{
fKnobMid = knobRect.origin.x + (knobRect.size.width/2);
[super drawKnob:knobRect];
}
On 27-Dec-05, at 1:48 AM, Andreas Mayer wrote:
Am 26.12.2005 um 22:24 Uhr schrieb Michael Hanna:
I got drawing going on in an NSSliderCell, in a
drawWithFrame:inView: ..a black line through the middle of the
slider knob.
Did you overwrite -drawKnob:?
Also, last time I tried, overwriting -drawBarInside:flipped: would
*not* stop NSSlider from drawing it's own slider bar.
Yeah I noticed that too, glad it's not me :)
Andreas
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40gmail.com
This email sent to email@hidden
regards, Michael
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden