[Cuis-dev] Simple 'plot' ?

Luciano Notarfrancesco luchiano at gmail.com
Mon May 30 23:04:01 PDT 2022


One way is to make a subclass of BoxedMorph and implement drawOn: to draw
whatever you want. Your method for #drawOn: will receive an instance of a
subclass of MorphicCanvas as argument, and you can send messages to the
canvas to draw. But this is more oriented to vector graphics, not really
pixel graphics.

If you want to draw pixels, you can create an instance of a Form and draw
pixels on it. For example, in a workspace you can do this:
  form := Form extent: 100 at 100
followed by alt-p. You will see a white form of 100x100 pixels in the
workspace.
Then draw something on it:
  10 to: 50 do: [:i| form colorAt: i at i put: Color red]
followed by alt-d.


On Tue, 31 May 2022 at 9:34 AM tuxic via Cuis-dev <cuis-dev at lists.cuis.st>
wrote:

> Hi,
>
> ...since I do not find...
> I am looking for a classe which allows me to oben a
> window/plane/whatever in which I can set points via commands...hrrmmm...
> sorry....to which I can send messages like plot to do simple pixel
> graphics...
> Is there something like this?
> (May be this is a simple language problem and I search only for the
> wrong words ...)
>
> Cheers!
> Meino
>
> --
> Cuis-dev mailing list
> Cuis-dev at lists.cuis.st
> https://lists.cuis.st/mailman/listinfo/cuis-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20220531/2577aa07/attachment.htm>


More information about the Cuis-dev mailing list