[Squeak-fr] histoire de pochoir

Frédéric Ferrère frederic.ferrere at free.fr
Dim 20 Mai 14:58:45 UTC 2007


La réponse (en provenance de squeak-dev) :
la méthode contentsOfArea ne copie pas automatiquement la table des couleurs
d'un objet ColorForms.

Comme confirmation le test suivant :

(ImageMorph new image) explore


puis

(ImageMorph new image contentsOfArea: (0 at 0 extent: 10 at 10)) explore


Dans le second cas on voit bien que colors = nil et pas dans le premier cas.


stephane ducasse a écrit :
> Pas sure que cela soit la reponse
>
>
> mais
>     Form fromUser stencil
>
>             fonctionne
>
>     ((ImageMorph fromString: 'stef') image contentsOfArea: (Rectangle 
> origin: 0 at 0 extent: 10 at 10)) stencil
>
> fonctionne aussi.
>
> J'ai l'impression que ColorForm est pas bien initializee de temps a autre
> Peux-tu reposer ta question sur squeak-dev?
>
> Si tu obtiens une reponse nous sommes preneur.
>
> Stef
>
> On 19 mai 07, at 10:42, Frédéric Ferrère wrote:
>
>> Bonjour à tous,
>>
>> une petite question sur un petit problème de pochoir, peut être un bug ?
>>
>> L'instruction suivante donne le pochoir (une Form) d'une image :
>>
>> ImageMorph new image stencil
>>
>>
>> Je souhaite extraire une zone de l'image et d'en obtenir un pochoir :
>>
>> (ImageMorph new image contentsOfArea: (Rectangle origin: 0 at 0 extent: 
>> 10 at 10)) stencil
>>
>>
>> j'obtiens alors l'erreur : "Error : Instances of UndefinedObject are 
>> not indexable"
>>
>>
>> Par contre si j'applique contentsOfArea sur le pochoir, pas d'erreur :
>>
>> ImageMorph new image stencil contentsOfArea: (Rectangle origin: 0 at 0 
>> extent: 10 at 10)
>>
>>
>> Est-ce normal ? Sachant que
>>
>> ImageMorph new image
>>
>> est un Form tout comme
>>
>> ImageMorph new image contentsOfArea: (Rectangle origin: 0 at 0 extent: 
>> 10 at 10)
>>
>> Merci
>>
>> Cordialement,
>> -- 
>> FERRERE Frédéric
>>
>> _______________________________________________
>> Squeak-fr mailing list
>> Squeak-fr at lists.squeakfoundation.org
>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/squeak-fr
>>
>
> _______________________________________________
> Squeak-fr mailing list
> Squeak-fr at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/squeak-fr



More information about the Squeak-fr mailing list