Redrawing & erasing a path
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.