• 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
Redrawing & erasing a path
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Redrawing & erasing a path


  • Subject: Redrawing & erasing a path
  • From: Chad Armstrong <email@hidden>
  • Date: Mon, 15 Apr 2002 20:44:34 -0600

Hello everyone,

Yet another question:

I have a custom NSView which I'm drawing to (mostly functions like sinx or x^2). I can get it to draw the function once, but it does not want to seem to change once it has been drawn the first time. I am using an NSBezierPath. Can I have a function in the drawRect: that will then check to see what type of function needs to be drawn and any changes done to it, and then draw it?

e.g.

drawRect:
{ .
.
.
determineFunct()

[path stroke];
}

determineFunct()
{
if (funct_type == xSquared)
{
[self xSquared];
}
else
{
[self sinx];
}
}

This is just very rough pseudo-code, but it should hopefully give an idea. So, is this plausible, or is there another way about getting a path to refresh itself and then be redrawn on the screen/view?

Best regards,

Chad Armstrong
email@hidden
_______________________________________________
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.

  • Follow-Ups:
    • Re: Redrawing & erasing a path
      • From: Ondra Cada <email@hidden>
  • Prev by Date: Re: NSData question
  • Next by Date: Gaining temporary access to copy files to the library folder...
  • Previous by thread: Re: Programmatic OutlineView
  • Next by thread: Re: Redrawing & erasing a path
  • Index(es):
    • Date
    • Thread