[Squeakland] pen trail as object (in OLPC)

karl karl.ramberg at comhem.se
Sun Sep 9 14:14:40 PDT 2007


Dreyfuss Pierre-André (EDU) wrote:
> Hi,
>
> if you are using the line object way, you get a line object with the shape of the trail.
> It is no more a trail painted by the object. This means that you have to change the properties of the line object.
>
>
> To change the color of the line, either use the color halo (magenta)or the line's borderColor tile (category fill & border ).
> For the width, use the line's borderWidth tile (category fill & border ).
> See the example project
>
> http://ofset.org:8000/super/uploads/Olpc-polygones.003.pr
>   
Nice.
And you can close the polygon to make it fill with color.

Karl
> Regards
> -------- Message d'origine--------
> De: Randy Heiland [mailto:heiland at indiana.edu]
> Date: dim. 09/09/2007 01:49
> À: Dreyfuss Pierre-André (EDU)
> Cc: Squeakland list
> Objet : Re: RE : [Squeakland] pen trail as object (in OLPC)
>  
> Thank you once again for your reply, Pierre-Andre.  You helped  
> provide details of what Alan had earlier suggested, I think.  I must  
> admit I still find it a bit confusing.  I basically repeated your  
> project - using a Line and Circle from the Graphics category of the  
> Objects Catalog.  However, I could never change the pen size of the  
> drawn polygon.  Is it not possible using this approach?  Similarly, I  
> tried to change the color - both the penColor (pen use category) and  
> in the color category, but could not.
>
> -Randy
>
> On Sep 8, 2007, at 5:37 PM, Dreyfuss Pierre-André (EDU) wrote:
>
>   
>> There is an other solution.
>> Use a lineMorph instead of penTrail.
>>
>>
>> Get object catalog from box flap.
>> Get a line in category graphics.
>>
>> get an ellipse
>>
>> The line has a category polygon in the script viewer
>> You'll find there all you need for creating a new vertex, putting  
>> it at the position of the ellipse.
>> move the ellipse and create a new vertex, put it at the position of  
>> the ellipse ... and so on
>>  The line is the wanted object and has the wanted shape !
>>
>> Here are the scripts  for getting a circle.
>>
>>
>> Player118 -- 1 instance, nommé Ligne
>> Player119 -- 1 instance, nommé Ellipse
>>
>>
>> ---------------------------------------------------------------------- 
>> ----------------------
>> Ligne. scripts :
>>
>> Ligne.newposition
>> 	self appendVertex.
>> 	self setVertexCursor: self getVerticesCount.
>> 	self setXAtCursor: Ellipse getX.
>> 	self setYAtCursor: Ellipse getY
>>
>> Ligne.init
>> 	self removeAllButCursor.
>> 	self setXAtCursor: Ellipse getX.
>> 	self setYAtCursor: Ellipse getY
>> ---------------------------------------------------------------------- 
>> ----------------------
>> Ellipse. scripts :
>>
>> Ellipse.script1
>> 	self forward: 5.
>> 	self turn: 5.
>> 	Ligne newposition
>>
>>
>> Download the project:
>> http://ofset.org:8000/super/uploads/lineTrack.002.pr
>>
>> Regards.
>>
>>
>>
>> -------- Message d'origine--------
>> De: squeakland-bounces at squeakland.org de la part de Randy Heiland
>> Date: jeu. 06/09/2007 02:06
>> À: Squeakland list
>> Objet : [Squeakland] pen trail as object (in OLPC)
>>
>> I was revisiting this issue - wanting to have my drawn pen trail
>> become an object, and I dug up this post:
>> http://article.gmane.org/ 
>> gmane.comp.lang.smalltalk.squeak.squeakland/869
>>
>> Are these directions still basically true for the OLPC etoys, i.e. do
>> I need to resort to writing a textual script?
>>
>> thanks, Randy
>>
>>
>>
>>     
>
>
>
> _______________________________________________
> Squeakland mailing list
> Squeakland at squeakland.org
> http://squeakland.org/mailman/listinfo/squeakland
>
>   




More information about the Squeakland mailing list