Axes and Bezierpath Line width
Axes and Bezierpath Line width
- Subject: Axes and Bezierpath Line width
- From: Cyprien <email@hidden>
- Date: Wed, 23 Jul 2003 11:46:56 +0200
I got a problem with my graph application. When I try to draw a
fonction with very disproportionated x and y scales, (x from -50 to 50
and y from -1 to 1 for example), my fonction becomes deformed.
When it is the x scale which is very big (-50 to 50), the horizontal
axe becomes very large, and the fonction becomes very large too in its
horizontal parts... (see image)
Here is some code from my app:
- (void)addAxesFrom:(NSPoint)pt1 to:(NSPoint)pt2
{
Segment *seg = [[[Segment alloc] initFrom:pt1 to:pt2] autorelease];
[seg setTag:AXES_TAG];
[self addGraphElement:seg];
}
-------------
sz = [self convertSize:NSMakeSize(1,1) fromView:nil];
[NSBezierPath setDefaultLineWidth:MAX(sz.width, sz.height)];
--------------
- (void)stroke
{
[color set];
[NSBezierPath strokeLineFromPoint:start toPoint:end];
}
[demime 0.98b removed an attachment of type image/tiff which had a name of img.tiff]
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.