[Newbies] How to draw a single pixel with permanence?

Jerome Peace peace_the_dreamer at yahoo.com
Sat May 1 07:46:46 UTC 2010


Hi Lawson, 

If you want to draw on a canvas, first you need to own the canvas.


So in a workspace, play with this:

=======
lawson := ImageMorph new image: Form fromUser .
"I suggest you pick 1 line of text as your form"


lawson openInHand .
 
lawson image bitEdit .
"because at this point you get the whole thing blown up.

"When you are done drawing on the enlarged form use its red menu to 
press accept.
Then you also need to delete the enlarged form." 

lawson changed .
"This last part marks your imageMorph as in need of updating.
If you forget this then the changes won't show until you pick up your morph."

=======

This is not exactly what you want but its the best I could come up with in a few minutes play. 

hth,

Yours in curiosity and service, --Jerome Peace

--- On Thu, 4/29/10, Lawson English <lenglish5 at cox.net> wrote:

> From: Lawson English <lenglish5 at cox.net>
> Subject: Re: [Newbies] How to draw a single pixel with permanence?
> To: "A friendly place to get answers to even the most basic questions about Squeak." <beginners at lists.squeakfoundation.org>
> Date: Thursday, April 29, 2010, 8:44 AM
> Bert Freudenberg wrote:
> > On 29.04.2010, at 13:15, Lawson English wrote:
> >   
> >> I'm trying to go back to beginnings with my own
> ManelBrot morph because I can quite grok how the one I have
> works.
> >>
> >> Mostly because I still dont grok morphs.
> >>
> >> Example: I'm trying to plot points on a morph
> using the drawOn message below:
> >>     
> >
> > Paint into a Form. Draw the form in #drawOn:.
> >
> >
> >   
> 
> I'm sorry, I don't understand.
> 
> Isn't this "painting" into a Form?
> 
> aCanvas  form  colorAt: 30 at 30 put: Color black.
> 
> 
> 
> My problem is that the pixel doesn't stay set.
> 
> 
> Lawson
> 
> _______________________________________________
> Beginners mailing list
> Beginners at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/mailman/listinfo/beginners
> 


      


More information about the Beginners mailing list