• 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
Re: Rects and points...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Rects and points...


  • Subject: Re: Rects and points...
  • From: AndrĂ© Benassi <email@hidden>
  • Date: Tue, 20 Nov 2001 22:32:03 -0600

I would check out Mike Beams 2 very recent articles on
O'Reilly. Here are the links:

http://www.oreillynet.com/pub/a/mac/2001/10/19/cocoa.html
http://www.oreillynet.com/pub/a/mac/2001/11/06/cocoa.html

They seem to cover precisely what you are trying to study, and should
give you
a good start on how to properly use the NSBezierPath class.

On Tuesday, November 20, 2001, at 09:16 AM, Riccardo Santato wrote:

> Hi there.
> I'd reaally like someone of you help me in making this code work.
> I'm just having fun with Bezier curves, but nothing is displayed... Can
> you tell me please where are the errors ?
> Many thanx to everyone 4 your kindness
>
> - (IBAction)draw:(id)sender
> {
> // Point definitions
> point_a = NSMakePoint(0.0, 0.0);
> point_b = NSMakePoint(100.0, 100.0);
> point_c = NSMakePoint(50.0,50.0);
> NSLog (@"points: defined");
>
> // Rectangle definition
> view_rect = [self bounds];
>
> // View allocation
> [self initWithFrame:view_rect];
>
> // Initializations
>
> [self setNeedsDisplay:YES];
> curve = [NSBezierPath bezierPathWithRect:view_rect];
> [self convertPoint:point_a toView:self];
> [self convertPoint:point_b toView:self];
> [self convertPoint:point_c toView:self];
> [[NSColor blackColor] set];
> [curve moveToPoint:point_a];
> [curve lineToPoint:point_b];
> [curve lineToPoint:point_c];
> [curve curveToPoint:point_a controlPoint1:point_b
> controlPoint2:point_c];
> [self drawRect:view_rect];
> [self displayRect:view_rect];
> }
>
> @end
>
>
> --
> Riccardo Santato
> www.riccardosantato.com
> _______________________________________________
> cocoa-dev mailing list
> email@hidden
> http://www.lists.apple.com/mailman/listinfo/cocoa-dev


References: 
 >Rects and points... (From: Riccardo Santato <email@hidden>)

  • Prev by Date: Re: What's up with sinf()?
  • Next by Date: Re: Mutability
  • Previous by thread: Re: Rects and points...
  • Next by thread: Re: Rects and points...
  • Index(es):
    • Date
    • Thread