• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Axes and Bezierpath Line width
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Prev by Date: Re: Bug reports and documentation updates
  • Next by Date: Re: Bug reports and documentation updates (was Re: Subclassing NSPort (or NSSocketPort))
  • Previous by thread: NSPoint location of the status menu
  • Next by thread: Slideshow 2 - call method in applescript
  • Index(es):
    • Date
    • Thread