Bruno,
> I'm trying to make a Class Modelator like Rational Rose Arena, but much
....
> much more simple.
>
> But I'm trying to make a Rectangle (like Rose class), but I can not do
it..
>
> Anyone use Dolphin to make graphic element ?
As you've obviously already considered, one option is to represent objects
by subviews of another view; but, I doubt this is what you'll want to do.
The short version on "custom" graphics is that you need to obtain an
appropriate Canvas, and then draw on it by sending message to it. Some of
those messages, such as #pen:, will involve other objects that you'll create
separately. I like to get the device resolution, start with physical
dimensions, and then scale to pixels before drawing. The result is that the
distances scale correctly for both screen and printer display.
You'll probably want to subclass View to display your graphics, which you'll
do by overriding #onPaintRequired: to draw on a canvas that you'll obtain
from the paint event. It's a good idea to try to locate the code that does
all of the work of drawing (on the canvas) in some other object so that you
can simply call it again for display on a printer or a bitmap. Note that
Ian offers a device-independent bitmap class that can save to a file, which
is very handy for some jobs.
Does that help?
Bill
--
Wilhelm K. Schwab, Ph.D.
[hidden email]