I have the following bit of code in an subclass of NSCell, which draws a circle (or oval) in the middle of the cell. It works. the circle appears to be centered within the cell. But, I would expect the x and y origin offsets to be the same to get that behaviour. If I modify x and y offsets to be the same (3), and increase the height and width modifications to 6, like I would expect to have to do, the circle isn't centered. Is that the correct behavior?

Rob

- (void) drawInteriorWithFrame: (NSRect)cellFrame inView: (NSView *)controlView;
{
NSBezierPath *circle;


  [_color set];
  circle = [NSBezierPath bezierPathWithOvalInRect: NSMakeRect(
    cellFrame.origin.x,
    cellFrame.origin.y +3,
    cellFrame.size.height-3,
    cellFrame.size.width-3)];
  [circle fill];
}



_______________________________________________
Bug-gnustep mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-gnustep

Reply via email to