ObjectProfile/Roassal3

Exporting to SVG using the SVG Cairo exporter is broken.

massimo-nocentini opened this issue · 2 comments

I'm writing from an Ubuntu (22.04 LTS) box and I'm trying to isolate an example about the exporting to SVG files using the Cairo SVG exporter: The problem that I've found is that the latest master branch yields a wrong exporting. The following steps can be used to reproduce my problem:

  1. Get a fresh image and the vm with curl https://get.pharo.org/64/110+vm | bash;
  2. then open it with ./pharo-ui, open a Playground and evaluate the following code:
Metacello new
    baseline: 'Roassal3Exporters';
    repository: 'github://ObjectProfile/Roassal3Exporters';
    load.
		
		  pango := (RSLabel new
			            text: 'hello world';
			            yourself) .

		  another := (RSLabel new
			              size: 14;
			              text: 'Mickey Mouse';
			              yourself).


		  RSLocation new above move: pango on: another.

		  c := RSComposite new
			       shapes: (RSGroup new
					        add: pango;
					        add: another;
					        yourself);
			       "translateTo: 100 asPoint;"yourself.
canvas := RSCanvas new.
		  canvas add: c.
		
		canvas svgCairoExporter zoomToShapes ;export.

that should produce a good SVG image

3858745080738774

with the two small labels.
3. evaluate then the following chunk that loads the latest master branch:

[Metacello new
    baseline: 'Roassal3';
    repository: 'github://ObjectProfile/Roassal3';
    load: 'Full' ] on: MCMergeOrLoadWarning do: [:warning | warning load ].
  1. then re-evaluate the chunks:
pango := (RSLabel new
			            text: 'hello world';
			            yourself) .

		  another := (RSLabel new
			              size: 14;
			              text: 'Michey Mouse';
			              yourself).


		  RSLocation new above move: pango on: another.

		  c := RSComposite new
			       shapes: (RSGroup new
					        add: pango;
					        add: another;
					        yourself);
			       "translateTo: 100 asPoint;"yourself.
canvas := RSCanvas new.
		  canvas add: c.
		
		canvas svgCairoExporter zoomToShapes ;export.

which produces a wrong image on my machine

3858745190725648

Is fixed after this pull request ObjectProfile/Roassal3Exporters#37