Hi, I'm developing a UI for an embedded device in inkscape. As I design the interface I do it using physical unit measures such as mm. In this way, I can get a 1:1 preview just clicking button key "1". Then when I actually implement the interface on the device I have to do it specifying sizes in pixels and the device has a specific DPI.
I would like to be able to design the interface in mm, and then to change the unit of measure in implementation phase such that I can measure sizes in pixel. I see that "1in" always corresponds to "96px", and it seams that there is no way to change. But I need 1mm to correspond to a specific number of px.
It doesn't need to be "px" the unit of measure that I use to measure actual pixels, it can also be a user defined unit of measure where i can set how many user units corresponds to a pixel.
Thanks for the reply, but I think it is not what I'm looking for.
When I change the document Scale (px x user-unit) all the unit of measure are scaled. I mean: If I draw an element of width 1in, whatever the scale is, when I change the viewed unit of measure to px, I always see 96px. I need to be able to adjust the ratio between two unit of measure (If there is a way).
So at the end, as far as I get there is no way to adjust the ratio between unit of measures. What you can change with the scale inside document properties is actually a "low level detail" of svg files (that I can't actually understand from this page https://wiki.inkscape.org/wiki/Units_In_Inkscape).
I think that having some kind of user defined unit of measure for which the ratio between it and other units can be changed, can be helpful. Maybe I will try to implement it.
The scale control does just that, but the controls bar (and probably other tools) is not reflecting the scale effect.
Scale control was implemented when the W3C redefined a css pixel size from 90px/in to 96px/in. This required massive refactoring for all the Inkscape code that had been hardcoded at 90.ย In their wisdom (truly), Inkscape devs integrated a method that could easily be adjusted for the next time the spec changed.ย
Hi,
I'm developing a UI for an embedded device in inkscape.
As I design the interface I do it using physical unit measures such as mm. In this way, I can get a 1:1 preview just clicking button key "1".
Then when I actually implement the interface on the device I have to do it specifying sizes in pixels and the device has a specific DPI.
I would like to be able to design the interface in mm, and then to change the unit of measure in implementation phase such that I can measure sizes in pixel. I see that "1in" always corresponds to "96px", and it seams that there is no way to change. But I need 1mm to correspond to a specific number of px.
It doesn't need to be "px" the unit of measure that I use to measure actual pixels, it can also be a user defined unit of measure where i can set how many user units corresponds to a pixel.
Is there a way to achieve this ?
Thanks,
Scale canย be changed in the Document Properties dialog. (Ctrl + Shift + D) This sets the pixels/unit (or units/pixel).
Thanks for the reply, but I think it is not what I'm looking for.
When I change the document Scale (px x user-unit) all the unit of measure are scaled. I mean: If I draw an element of width 1in, whatever the scale is, when I change the viewed unit of measure to px, I always see 96px. I need to be able to adjust the ratio between two unit of measure (If there is a way).
Yeah, Iย think you have found a longstanding bug. I see this back to 9.2.5.ย I'm looking into it:ย https://gitlab.com/inkscape/inkscape/-/issues/3614
The scale setting in document properties is related to the code written to the svg file (width, height and viewBox).
The pixels shown in tool controls bar is related to the size of the css pixel defined in the configuration file units.xml.
As I see it this is expected behaviour.
ย
So at the end, as far as I get there is no way to adjust the ratio between unit of measures. What you can change with the scale inside document properties is actually a "low level detail" of svg files (that I can't actually understand from this page https://wiki.inkscape.org/wiki/Units_In_Inkscape).
I think that having some kind of user defined unit of measure for which the ratio between it and other units can be changed, can be helpful. Maybe I will try to implement it.
ย
The scale control does just that, but the controls bar (and probably other tools) is not reflecting the scale effect.
Scale control was implemented when the W3C redefined a css pixel size from 90px/in to 96px/in. This required massive refactoring for all the Inkscape code that had been hardcoded at 90.ย In their wisdom (truly), Inkscape devs integrated a method that could easily be adjusted for the next time the spec changed.ย
The bug report is moved to here.ย https://gitlab.com/inkscape/inbox/-/issues/7170
ย
Thank you Tyler for having reported the issue. I'll follow the issue on gitlab.