Am 14.11.2014 00:57 schrieb "Chris Cunningham" cunningham.cb@gmail.com:
Nah, morphic works. What you do is have it write to a canvas big enough
to hold the drawing, then get the form under it, and then save that out. So, something like this in the morph:
asForm | canvas | canvas := FormCanvas extent: self extent. self drawOn: canvas. ^canvas contentsOfArea: bounds
and write it out with:
PNGReadWriter putForm: morph asForm onFileNamed: 'someFileName.png'
I've used this with rediculously large diagrams before.
-chris
Yes, pure morphic.
But rendering the above Diagramm in a morphic window and with Athens (and therefore Cairo) only works, because it only renders the visible part. If you have a display with >32k width or hight, you would suffer from the same Problem.
Then, can we not scale the picture to fit in the maximum allowed dimensions?
Cheers, Doru
On Fri, Nov 14, 2014 at 12:46 PM, Nicolai Hess nicolaihess@web.de wrote:
Am 14.11.2014 00:57 schrieb "Chris Cunningham" cunningham.cb@gmail.com:
Nah, morphic works. What you do is have it write to a canvas big enough
to hold the drawing, then get the form under it, and then save that out. So, something like this in the morph:
asForm | canvas | canvas := FormCanvas extent: self extent. self drawOn: canvas. ^canvas contentsOfArea: bounds
and write it out with:
PNGReadWriter putForm: morph asForm onFileNamed: 'someFileName.png'
I've used this with rediculously large diagrams before.
-chris
Yes, pure morphic.
But rendering the above Diagramm in a morphic window and with Athens (and therefore Cairo) only works, because it only renders the visible part. If you have a display with >32k width or hight, you would suffer from the same Problem.
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
The question is how often do we need to export such a large pictures?
Else, we can always export as html. And this support well very large pictures.
Cheers, Alexandre