SVG PDF Rendering on OSX 10.14

I have used a method for years that does the following (abbreviated code):

READ PICTURE FILE** ($tPath;$pTemporary)
$tSVGDocument:= ***SVG_New***
$tSVGObject:= ***SVG_New_embedded_image*** ($tSVGDocument;$pTemporary)

` Adds some SVG

pChart:= ***SVG_Export_to_picture*** ($tSVGDocument;1)

The picture file is a pdf stored in my Resources folder.
Since migrating to v18.1, I have observed that the rendering of the of the picture is incorrect on OSX 10.14.

I have attached 3 pictures (png) to illustrate.

  1. The original
  2. The picture as it is render on OSX 10.13.6
  3. The picture as it is render on OSX 10.14.6 (darker one)

Note that on 10.14.6 the lines are difficult to read and make out one form the other. The picture is much darker and the grid is not visible. This makes it very difficult to read the graph.

Bug? Workaround?
Did I miss something in the documentation?

Thanks

Mitch

It is hard to comment without knowing which part of the graph is SVG and which part is embedded image (PDF), but I can appreciate from the screenshots that:

  1. hairlines are thick
  2. antialiasing is blurring the edges

In SVG, you can tell the rendering engine (4D in this case) to balance geometric accuracy, crispness, rendering speed.

shape-rendering

You probably know this already, but to draw a line whose width is an odd number, you need to shift its coordinates by 0.5 so that the logical centre is positioned in the middle of a pixel, otherwise it consumes half a pixel on each side and become blurry.

Hi, The only SVG drawn are the blue and black dots. The example with no des is just the pdf. So it is not the SVG that I create that is not rendered well. It is the background picture. (The background picture is all the pink that you see.)

Mitch

In other words, the problem coccus even if I draw no SVG shapes at all.

READ PICTURE FILE** ($tPath;$pTemporary)
$tSVGDocument:= ***SVG_New***
$tSVGObject:= ***SVG_New_embedded_image*** ($tSVGDocument;$pTemporary)
pChart:= ***SVG_Export_to_picture*** ($tSVGDocument;1)

The above code will trigger two different results in pChart depending on whether I am on OSX 10.13 or 10.14.

I can forward you the pdf if you would like to try.

Thanks

Mitch

Do you know if the SVG component converts PDF to some other image format (such as PNG) when you insert it as “embedded image”?

You could use picture operators or the COMBINE PICTURES command to superimpose your SVG on top of your PDF.

Also, is the different apparent on a 4D form or in a PDF viewer such as Apple Preview?

I tried COMBINE PICTURES it doesn’t allow me to overlay once as a transparent picture over the other.

Anyway, I solved the problem by putting two picture variables on the same page, both set to On Background. I load the background in one. Create the SVG and export to the other picture.

Thanks

Mitch