No scaling in hpgl output

Bug #391923 reported by Preben S
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
Undecided
Alvin Penner

Bug Description

There is no scaling in hpgl output.

I have added plotting of visible layers only, scaling, mirroring and offset to hpgl_output.py and hpgl_output.inx.

Please test, in particular if you can plot hpgl.

File hpgl_output.zip attached.

Tags: exporting hpgl
Revision history for this message
Preben S (prsodk) wrote :
Revision history for this message
dopelover (dopelover) wrote :

I tried to save a simple elipse as hpgl file using your routine but Inkscape returned some information and produced an empty file.
See attached traceback.

Revision history for this message
Alvin Penner (apenner) wrote :

cannot reproduce this error message using the new version. Could you attach the svg file and perhaps the settings used, especially the flatness?

I will try to test this new version a bit during the next week or so and see if it looks reasonable.

Revision history for this message
Alvin Penner (apenner) wrote :

fix tested and committed to svn rev 21716, thanks Preben!

I did not quite understand the implementation of the x,y offset so I took the liberty of rewriting the x,y offset as a displaced origin instead, in units of the screen display pixels. However, I can see that there is no easy way to deal with the upside down coordinate system, so feel free to rewrite my rewrite, if desired.

Changed in inkscape:
status: New → Fix Committed
Revision history for this message
Preben S (prsodk) wrote :

As with the older hpgl output, only path data are parsed correctly, and the bezier paths are converted to piecewise linear segments in the output.
All other objects must be converted to path at the moment.
Clones should also be "uncloned" at the moment.
I do consider to convert at least both ellipse and cubic spline to their corresponding primitives in hpgl format.

Programming with xpath is quite new for me, so I will probably make an improvement in using xpath, using relative path instead of the "everywhere path" used now (if I understand the tiny bit of documentation I have found correctly, this should be easy). This should also make it more convenient to use color (for pen selection) from stroke, whatever if this attribute is stored with the object or with a parent group (I think it will be easy to recurse through the parents with relative path until a valid stroke is found).

Concerning offsets, I think the offsets should be in a unit people can relate to, like inches or millimeters. The hpgl plot units are like mils, just rounded to match metric system. My personal preference would be the "mils like" plot units. Any other opinions on this?

su_v (suv-lp)
tags: added: exporting hpgl
su_v (suv-lp)
Changed in inkscape:
assignee: nobody → Alvin Penner (apenner)
milestone: none → 0.47
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.