Menu

#98 [vector render] Do not ignore scaler option if width = 0 and height = 0

2.0
closed
None
2019-08-30
2018-04-19
No

Hi!

After modifying the svg backend for a vector output to be rendered in a custom main program I've noticed zint has already something for that purpose in render.c. Since zint can render both raster and vector and render.c is vector only, what do you think about name change to indicate this? E.g. vector-render.c?

Now to the actual issue. In commit [1] custom width and height parameters have been introduced. While setting them to 0, the render should ignore theam and respect the scaler symbol option. But the commit [2] seems to ignore this rule forcing to specify width and height always. Anyway it doesn't work with recent master.

Thanks,
Andrey

[1] https://sourceforge.net/p/zint/code/ci/847cd70e32458936bc78b1c95944332e15578e31
[2] https://sourceforge.net/p/zint/code/ci/8d4398e1bb8edf44043215b12f03c62861e7a1b9

Discussion

  • Robin Stuart

    Robin Stuart - 2018-04-20

    Hi Andrey,

    The vector image handling definately could do with some attention - at the moment there is a lot of functionality which is duplicated across EPS, EMF and SVG which could be pulled together. This is something I intended to do but it's a big job so has been waiting for a period of relative calm so that I can concentrate on it. Another thing I was intending to add at the same time is the option to rotate vector graphics - something which currently can only be done with raster graphics.

    Render.c was developed specifically for use by glabels. This is why it has slightly odd behaviour and why it is not documented. I would be reluctant to alter it as this would break existing compatability, but I think part of the above process could be replacing it with a more robust solution, giving the chance for a properly documented way of getting vector data out of zint. My current thinking on this is that it would be done in a new code file at vector.c, and that render.c could then be depreciated and eventually removed.

    Robin.

     
  • Robin Stuart

    Robin Stuart - 2018-06-21

    A new common vector structure has now been implemented in vector.c and it is now being used internally by the encoders for SVG, EMF, EPS and for QPainter in the GUI. The next step is to add this to the documentation.

     
  • Andrey Gursky

    Andrey Gursky - 2018-06-21

    Robin, thanks for the update!

     
  • Harald Oehlmann

    Harald Oehlmann - 2018-11-02
    • status: open --> pending
    • assigned_to: Harald Oehlmann
     
  • Harald Oehlmann

    Harald Oehlmann - 2018-11-02

    Andrey,
    could you check if the observed bug/issue is still present with the new renderer ?

     
  • Harald Oehlmann

    Harald Oehlmann - 2019-08-30
    • status: pending --> closed
     
  • Harald Oehlmann

    Harald Oehlmann - 2019-08-30

    Andrey,
    could you check if the observed bug/issue is still present with the new renderer ?

    No comment, closing. Please come back if issue persists.

     

Log in to post a comment.