The answer (second option by writing the image to disk) is

| myMorph myForm myPillarSource myPillarDOM |

myMorph := AlignmentMorph newRow
                   addMorph: (EllipseMorph new color: Color red);
                   addMorph: (EllipseMorph new color: Color yellow);
                   addMorph: (EllipseMorph new color: Color green);
                   openInWorld.

myForm := myMorph imageForm.
myMorph delete.

PNGReadWriter
                putForm: myForm
                onFileNamed: 'myImage.png'.



myPillarSource := '

!The title
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do
eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad
minim veniam, quis nostrud exercitation ullamco laboris nisi ut
aliquip ex ea commodo consequat. Duis aute irure dolor in
reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla
pariatur.

+The caption of my image>file://myImage.png|label=myLabel+

Excepteur sint occaecat cupidatat non proident, sunt in culpa qui
officia deserunt mollit anim id est laborum.
'.


myPillarDOM :=   PRPillarParser parse: myPillarSource.


(PRHTMLWriter write: myPillarDOM) contents inspect





HH.


On 8/28/17, H. Hirzel <hannes.hir...@gmail.com> wrote:
> Hello
>
> Is it possible to include a in-image picture in Pillar which I get by
> evaluating
>
>     myMorph imageForm?
>
> Or do I need to write the instance of Form I get by evaluating the
> expression above first as a PNG file to disk and get it from there.
>
>
> PNGReadWriter
>               putForm: myMorph imageForm
>               onFileNamed: aString
>
> If yes what is the default directory where does Pillar expects pictures --
>
>
> The Pillar cheat sheet [1] and the Pillar chapter in the Pharo
> enterprise book no 3 [2] have an example
>
>     +Caption>file://image.png|width=50|label=label+
>
>
> Regards
>
> Hannes
>
>
>
> [1]
> http://pillarhub.pharocloud.com/hub/pillarhub/pillarcheatsheet
>
> [2] Section 3.8 of
> https://ci.inria.fr/pharo-contribution/job/EnterprisePharoBook/lastSuccessfulBuild/artifact/book-result/PillarChap/Pillar.html
>

Reply via email to