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@0 extent: 10@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@0 extent: 10@10)
Est-ce normal ? Sachant que
ImageMorph new image
est un Form tout comme
ImageMorph new image contentsOfArea: (Rectangle origin: 0@0 extent: 10@10)
Merci
Cordialement, -- FERRERE Frédéric
Pas sure que cela soit la reponse
mais Form fromUser stencil
fonctionne
((ImageMorph fromString: 'stef') image contentsOfArea: (Rectangle origin: 0@0 extent: 10@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@0 extent: 10@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@0 extent: 10@10)
Est-ce normal ? Sachant que
ImageMorph new image
est un Form tout comme
ImageMorph new image contentsOfArea: (Rectangle origin: 0@0 extent: 10@10)
Merci
Cordialement,
FERRERE Frédéric
Squeak-fr mailing list Squeak-fr@lists.squeakfoundation.org http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/squeak-fr
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@0 extent: 10@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@0 extent: 10@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@0 extent: 10@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@0 extent: 10@10)
Est-ce normal ? Sachant que
ImageMorph new image
est un Form tout comme
ImageMorph new image contentsOfArea: (Rectangle origin: 0@0 extent: 10@10)
Merci
Cordialement,
FERRERE Frédéric
Squeak-fr mailing list Squeak-fr@lists.squeakfoundation.org http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/squeak-fr
Squeak-fr mailing list Squeak-fr@lists.squeakfoundation.org http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/squeak-fr
Donc ton code marche si tu copies a la main la couleur?
pourrait remplir un bug report dans mantis car cela serait bien que cela soit fait automatquement
Stef
On 20 mai 07, at 16:58, Frédéric Ferrère wrote:
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@0 extent: 10@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@0 extent: 10@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@0 extent: 10@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@0 extent: 10@10)
Est-ce normal ? Sachant que
ImageMorph new image
est un Form tout comme
ImageMorph new image contentsOfArea: (Rectangle origin: 0@0 extent: 10@10)
Merci
Cordialement,
FERRERE Frédéric
Squeak-fr mailing list Squeak-fr@lists.squeakfoundation.org http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/squeak-fr
Squeak-fr mailing list Squeak-fr@lists.squeakfoundation.org http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/squeak-fr
Squeak-fr mailing list Squeak-fr@lists.squeakfoundation.org http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/squeak-fr
squeak-fr@lists.squeakfoundation.org