I have detected problem with drawing in view, that have other bounds
than his frame.
For examle:
@interface MyView: NSView
@end
@implementation MyView
- (void) drawRect: (NSRect) dRect
{
[[NSColor blueColor] set];
NSRectFill (dRect);
[[NSColor redColor] ser];
PSsetlinewidth (2.);
PSmoveto (0.,0.); PSlineto (25.,12.5);
[NSFont fontWithName: @"Helvetica" size: 12.];
PSshow ("Test");
PSstroke();
}
@end
....
- (void) creatWindow
{
id myWindow = [[NSWindow alloc] initWithContentRect: NSMakeRect
(0.0.,100.,50.)
....];
id myView = [[MyView alloc] initWithFrame: NSMakeRect
(0.,0.,100.,50.)];
[myWindow setContentView: myView];
[myView setBoundsSize: NSMakeSize (50.,25.)];
[myView setBoundsOrigin: NSMakePoint (0.,0.)];
[myWindow makeKeyAndOrderFront: nil];
}
In thi example is created window with view, that bounds are different
that his frame (bounds are two times less than frame). When drawing is
made, the line is drawed from left-down corner of the window to the
middle of the window, but width of this line is only 2. pixels (instead
4. pixels, that is wrong). In the middle of the window is displayed
text: "Test", but with bad size.
The size of Text and linewidth are not scaled. (In Openstep 4.2 the size
of NSFont and linewidth are scaled according the bounds size of the
view.)
I'm using gstep-core-000409, (Linux/Debian).
Jan Trembulak
[EMAIL PROTECTED]