: Pixels in Vectors - SVG I am working on the svg-edit application and I am receiving customer orders through the web. I am converting those pixels to mm based on the formula 3.77 pixels =
I am working on the svg-edit application and I am receiving customer orders through the web.
I am converting those pixels to mm based on the formula 3.77 pixels = 1 mm.
Is there anyway that something might go wrong if my customer uses a different PPI than what I am using or maybe a different monitor or operating system or maybe a monitor?
If a user draws a shape on my online editor using a different PPI than I do is there any possibility that I will get a different pixel shape?
Is there any possibility that my formula might have to change if my customer is using a different PPI, monitor or operating system or even browser than I do?
More posts by @Hamaas979
2 Comments
Sorted by latest first Latest Oldest Best
You may or may not have a problem.
You say:
The user is able to preload the editor with a fixed canvas size..
either its 500 * 500 pixels or 300* 300 pixels ... my user draws in
pixels but i tell him that this is millimiters. The user has no idea
it is pixels
If you make the user aware that the canvas area on the screen represents a printable area of 80 mm square or 133 mm square (using your existing 3.77 px per mm = 96 px per inch (ppi) conversion factor) then that should be OK.
(I have to say, I think you may have started by looking at the wrong end of the problem. Are your print sizes actually intended to be 80 mm square or 133 mm square?)
One way of doing this by showing rulers with mm units around the canvas, as Horatio suggests. Although you don't necessarily need to be explicit, e.g. if your application was for printing on CDs and your canvas showed the outline of a CD it would be obvious.
But if you are relying on the canvas on the screen being true to print size, i.e. actually measuring 80 mm square or 133 mm square on the user's screen, you have a problem, as this will only be be true for monitors which display at 96 ppi, and where there is no additional scaling in the browser or OS.
Desktop and laptop screens commonly have a a ppi value between about 80 and 130, and much higher for some mobile devices, so there will be a great deal of difference.
It is plausible (without getting into a discussion of whether it is likely) that an end user is viewing the application with some equipment or setup that alters the aspect ratio of the display.
In this scenario, what they see as a square would appear to you on the server end as a rectangle.
One simple way to guard against this is to show a square and inform the user that if it does not look like a square to them, then there is a problem.
Regarding actual size in real-world units, you would show a scale of some sort which they can use to scale or zoom the application and hold a ruler up to the screen.
Both of these would be simple ways to calibrate the client display.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.