Jump to content

Inch symbol


midora

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:

 

post-79572-0-37845100-1417594928_thumb.j

 

midoras signature.gif

Link to comment
Share on other sites

Shift + ' = " Whatever it's called. Next to the Enter key.

(you can tell I'm schooled up on this right?)

Link to comment
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

 

 

 

 

 

 

 

 

Edited by midora

midoras signature.gif

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...