Sign in to follow this  

Inch symbol

Recommended Posts

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:




Share this post

Link to post
Share on other sites

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









Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this