gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problem with NSBezierPath when used in drawInteriorWithFrame:


From: Quentin Mathé
Subject: Problem with NSBezierPath when used in drawInteriorWithFrame:
Date: Mon, 19 Jan 2004 01:31:06 +0100

I have a problem with NSBezierPath...

when I run the two code pieces below written in the NSButtonCell class :

1)
- (void)drawInteriorWithFrame: (NSRect)cellFrame

... blabla

[NSBezierPath fillRect: cellFrame];

… blabla
}

2)
- (void)drawInteriorWithFrame: (NSRect)cellFrame
NSBezierPath *defaultMark;

... blabla

defaultMark = [NSBezierPath bezierPath];
[defaultMark moveToPoint: NSMakePoint(cellFrame.origin.x, cellFrame.size.height)]; [defaultMark lineToPoint: NSMakePoint(cellFrame.size.width, cellFrame.size.height)]; [defaultMark lineToPoint: NSMakePoint(cellFrame.size.width, cellFrame.origin.y)]; [defaultMark lineToPoint: NSMakePoint(cellFrame.origin.x, cellFrame.origin.y)];
[defaultMark closePath];

[defaultMark fill];

… blabla
}

I obtain two rectangles but which are not identical. The rectangle 2) is two pixels smaller for the height and one pixel smaller for the width than the rectangle 1).
It would make me happy that someone have an idea on this issue ?

Quentin.

--
Quentin Mathé
address@hidden




reply via email to

[Prev in Thread] Current Thread [Next in Thread]