2014-11-01 22:06 GMT+01:00 Tudor Girba <tudor@tudorgirba.com>:
Hi,

We have gone through most of the Roassal problems, but we still have a couple of issues left.

First, we need to be able to export to PNG. Right now, the implementation exports only the visible part of the morph, but it should export the whole canvas. Ideally, we should use the Athens ability of exporting PNGs:

Is there any notion of "view (all shapes) extent"? I am afraid the extent is only defined by the actual Morph, therefore, we
can only draw and export the visible part in the morph.

Using Athens for exporting, we need a way to create an AthensSurface with the correct (enlarged) extent. The problem is, the extent is defined
by TrachelShape but the TRMorph is the one holding the AthensSurface.

Your proposed solution in https://code.google.com/p/moose-technology/issues/detail?id=1089#c4
should work, although it does not go through athenssurface>>writeToPng: but instead it
creates a form
renders on an athens surface
copies the rendering on to the imageform
export the image form

If your code creates a rendering error like NBFFICallout class>>#signalError, it is because
the Athens-Api is picky about Fraction as arguments for surface extents or transformations:

TRMorph>>#drawOn:
....

cs pathTransform
            translateBy: self extent / 2;                                     "<<----------"
                scaleBy: trachelCanvas camera scale asFloat;
            translateBy: trachelCanvas camera position negated.
        trachelCanvas shapes do: [ :trachelShape |
            trachelShape drawOn: cs.
        ].

...







Then, we still have a couple of visualizations left to port:
PPParser>>visualizeStructureInGraphOn:
PPParser>>viewAllNamedParsersWithSelection:previewing:on: 

Any takers?

Cheers,
Doru



--

"Every thing has its own flow"

_______________________________________________
Moose-dev mailing list
Moose-dev@iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev