MadJik Posted April 9, 2011 Share Posted April 9, 2011 Hey Guys So far so good, thanks! Been using Paint.net for a few years now and really enjoying. Have a question though related to the plugin... The grid seems to be in pixels. I'm working on a project at the moment where I'm using "mm" but the grid and ruler don't match up anymore. Yeah yeah, I know I should be using autocad. Is is possible to change the grid units in mm? Thanks in advance I think it could be a good idea, then just after that I said to myself "Why should I do this only for the grid plugin? This problem is more general..." BTW : 1.What do you think about it? 2.Does anyone know if there is a simple possibility for that? Quote My DeviantArt | My Pictorium | My Plugins | Donate via Paypal Link to comment Share on other sites More sharing options...
Rick Brewster Posted April 11, 2011 Share Posted April 11, 2011 Huh? I'm confused. Are you trying to develop a plugin for this, or what? Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to comment Share on other sites More sharing options...
MadJik Posted April 11, 2011 Author Share Posted April 11, 2011 No, I was just wondering how we could easily have some sliders in plugins working with the unit instead of only pixel. The point is to obtain the DPI in order to do the right conversion. The question is : should we do the routine for each of this sliders or could we have something more standard? Thanks Quote My DeviantArt | My Pictorium | My Plugins | Donate via Paypal Link to comment Share on other sites More sharing options...
Rick Brewster Posted April 12, 2011 Share Posted April 12, 2011 Well unit conversion is just some simple math. ~2.54 cm per inch is the starting point. 100 cm per meter. 10 mm per cm. 12 in per foot. I already have some conversion methods on the Document class, but they could easily be pushed into a more general purpose utility class. Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to comment Share on other sites More sharing options...
MadJik Posted April 12, 2011 Author Share Posted April 12, 2011 Ok for the bases cm/m/inch But to convert from/to pixel I need to know the DPI set in the image properties. I can't find the correct c# code to have it. Is there something like EnvironmentParameters.Dpi ? Quote My DeviantArt | My Pictorium | My Plugins | Donate via Paypal Link to comment Share on other sites More sharing options...
Rick Brewster Posted April 12, 2011 Share Posted April 12, 2011 That info isn't available for plugins. Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to comment Share on other sites More sharing options...
MadJik Posted April 12, 2011 Author Share Posted April 12, 2011 thanks for this info. Quote My DeviantArt | My Pictorium | My Plugins | Donate via Paypal Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.