[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Problem with NSBezierPath when used in drawInteriorWithFrame:
From: |
Alexander Malmberg |
Subject: |
Re: Problem with NSBezierPath when used in drawInteriorWithFrame: |
Date: |
Mon, 19 Jan 2004 01:55:55 +0100 |
Quentin Mathé wrote:
[snip]
> 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 ?
This is the expected behavior. This:
> 1)
[...]
> [NSBezierPath fillRect: cellFrame];
... fills a rectangle with top-right (assuming positive width and
height) corner (cellFrame.origin.x + cellFrame.size.width,
cellFrame.origin.y + cellFrame.size.height), while this:
> 2)
[...]
> 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];
fills a rectangle with top-right corner (cellFrame.size.width,
cellFrame.size.height). These are different rectangles;
cellFrame.size.width != cellFrame.size.width + cellFrame.origin.x .
You should probably ask questions like this discuss-gnustep, not
gnustep-dev. (Or, if you're fairly certain it's a GNUstep bug,
bug-gnustep.)
- Alexander Malmberg