Dear Reg,

Roassal may help you on this.

Consider the following Roassal script:
-=-=-=-=-=-=-=-=-=-=-=-=
| v circle1 circle2 edge |
"we define the view"
v := RTView new.

“Two circles"
circle1 := ((RTEllipse new size: 50) + (RTLabel new text: '1')) element.
circle2 := ((RTEllipse new size: 50) + (RTLabel new text: '2')) element.

“Make the circles draggable"
circle1 @ RTDraggable.
circle2 @ RTDraggable.

“Defining an edge between the two circles"
edge := (RTLine new width: 10) edgeFrom: circle1 to: circle2.

circle2 translateTo: 60 @ 80.

v add: edge.
v add: circle1.
v add: circle2.
v open.

"We export the whole thing"
RTPDFExporter new exportView: v.
-=-=-=-=-=-=-=-=-=-=-=-=

You can reproduce the script by loading Roassal2 and GraphET2 from 
smalltalkhub. Else you can directly jump on the Moose distribution for trying 
this out ( 
https://ci.inria.fr/moose/job/moose-5.0/lastSuccessfulBuild/artifact/moose-5.0.zip
 ).

I have uploaded the result for you: 
https://dl.dropboxusercontent.com/u/31543901/TMP/foo.pdf

We can manipulate images as well (e.g., 
https://www.facebook.com/ObjectProfile/posts/628687443884523 )

Let us know how it goes...

Cheers,
Alexandre


On May 8, 2014, at 9:00 AM, Reg Krock <[email protected]> wrote:

> Hi,
> 
> What is involved in creating an application in Pharo, part of would which do 
> the following:
> 1) Copy an image (ex: jpg) into a a window area.
> 2) Allow the user to add basic shapes on top of the image - square, circle, 
> with text inside the shape.
> 3) Save this and generate a PDF.
> 
> There is business domain logic surrounding this. 
> 
> Regards,
> 
> Reg

-- 
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.




Reply via email to