midora Posted December 3, 2014 Share Posted December 3, 2014 I'm just adding the possibility to allow the user to enter values with different units into NumericUpDown controls in the OptionBasedLibrary. Wikiipedia says the inch symbol is ( in ) or a double prime ( ″ ). So here is a question for the non-metric-oriented developers or users ;-) What does a user type on the keyboard: in, double prime, double quote or two single quotes? No idea what should be allowed. The screenshot shows in the tooltip what is used in the moment: Quote Link to comment Share on other sites More sharing options...
MJW Posted December 4, 2014 Share Posted December 4, 2014 If I don't spell out "inches," I use the double quote mark ("). Quote Link to comment Share on other sites More sharing options...
Ego Eram Reputo Posted December 4, 2014 Share Posted December 4, 2014 Shift + ' = " Whatever it's called. Next to the Enter key. (you can tell I'm schooled up on this right?) Quote ebook: Mastering Paint.NET | resources: Plugin Index | Stereogram Tut | proud supporter of Codelab plugins: EER's Plugin Pack | Planetoid | StickMan | WhichSymbol+ | Dr Scott's Markup Renderer | CSV Filetype | dwarf horde plugins: Plugin Browser | ShapeMaker Link to comment Share on other sites More sharing options...
Rider01 Posted December 4, 2014 Share Posted December 4, 2014 I'd use double quotes or write it as "in". Though I'm not familiar with inches. Also, there's no double prime symbol on my keyboard. @EER: Can't find it... Quote Link to comment Share on other sites More sharing options...
midora Posted December 5, 2014 Author Share Posted December 5, 2014 (edited) Looks like this double prime may be the official symbol but users are typing what's available on the keyboard. Means the double quote. I guess I will use double prime but create aliases to map input of double quotes or two single quotes. Added my current test plugin here. So if some one likes to check it out. How does it work: Each NumericUpDown control which shows a tooltip with units can accept values together with the units as input. The first unit in the tooltip is the base unit. If you are typing a value without unit then the base unit will be assumed. Typing just a unit will convert the current content of the NumericUpDown to this unit. Clearing the NumericUpDown will show the last value with the base unit. So if the content is '1 in' and you are typing 'cm' + TAB then the content will show '2.54 cm'. The base unit of most length controls is 'px'. To allow 'in' or 'cm' the plugin needs a dpi value. Typically the dpi value of the image should be used, but effect API of Paint.NET does not allow to access this value. So you have to enter the dpi value at the bottom of the dialog. Default is 96 dpi. Instead of dpi you may enter dpcm or dpmm, Instead of angle deg you may enter rad or gon 😉 As always OptionBasedLibraryXXX.dll and .dlc must be placed in the Paint.NET folder. ParallelLines.Effect.dll and .dlc in the Effects folder, Menu Effects->Render->Parallel Lines Edited November 14, 2021 by midora Quote 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.