﻿Paint.NET 'Spirit Level' Photo Effect Plugin

+-------------------------------------------------------------------------------
| Summary
+-------------------------------------------------------------------------------
This Paint.NET effect plugin allows you to rotate a layer using a virtual
spirit level. If you need to rotate an image then flatten it first.

The rotation is limited to the range +/- 45°. This restriction allows the plugin 
to distinguish between horizontal and vertical leveling automatically.

Auto Scale modes allow you to define how the rotated layer will be scaled in
the exiting image. Respect that the rotated image will be cropped to the 
current image dimension.

Padding modes define how areas uncovered after the rotation will be filled up.
Padding does not have any effect to the rotated area itself. So a transparent
area in the image will stay transparent.

If you need the rotated image in its rotated size (without scaling or cropping)
then use the 'Copy' to clipboard command in the plugin, cancel the dialog, and
execute Paint.NETs 'Paste into New Image' command. Or use 'Save As ...' to
store the rotated image in a file.

+-------------------------------------------------------------------------------
| Keywords
+-------------------------------------------------------------------------------
Straighten, Rotate, Spirit Level, Plumb Bob, Horizontal, Vertical, Horizon

+-------------------------------------------------------------------------------
| Author
+-------------------------------------------------------------------------------
Martin Osieka
You may use this plugin together with Paint.NET w/o any restriction.

+-------------------------------------------------------------------------------
| Installation
+-------------------------------------------------------------------------------
Follow the instructions carefully
- Unzip "SpiritLevel.Effect vX.X.zip"
- Copy the two files SpiritLevel.Effect.dll/.dlc to the Paint.NET\Effects\ folder
  .dll contains the module code
  .dlc contains the module configuration (like translated text)
After a restart of Paint.NET you will find the plugin at 
  Menu->Effects->Photo->Rotate using a spirit level...
oder für deutsche Anwender unter 
  Menu->Effekte->Foto->Rotieren mit Wasserwaage...

+-------------------------------------------------------------------------------
| Compatibility
+-------------------------------------------------------------------------------
Paint.NET 3.5.11 and 4.05

+-------------------------------------------------------------------------------
| Supported languages
+-------------------------------------------------------------------------------
English, 
Deutsch, 
русский (provided by ReMake)

+-------------------------------------------------------------------------------
| User Interface
+-------------------------------------------------------------------------------
Choose the object in the image you like to align horizontal or vertical by 
drawing a line to the image. After releasing the mouse button the image will be 
rotated so that the line is horizontal or vertical in the main canvas. 
You may drag the start and end points of the line later to correct the position.
If the angle of the line you have drawn is less than +/- 45 degrees compared to 
a horizontal line then a horizontal leveling will be done else a vertical one.
Tip: The precision of the rotation depends on the length of the line. Longer
is better in this case.

Auto scaling modes:
If you rotate an image then parts of the image will no longer be inside of the
original image dimensions and other parts will be uncovered.
A plugin can not change these dimensions but you can choose one of the auto 
scaling modes to define how the rotated image will fit into the original image.
- Scale In: Increases the size of the image so that there are no uncovered areas
- Off: Bo scaling
- Scale Out: Decreases the size of the image so that there are no parts outside.
 
Padding modes:
If there are uncovered areas after the rotation then the padding mode defines 
how these areas will be filled.
- Transparent
- Primary color
- Secondary color
- Keep: The uncovered areas show the pixels of the original unrotated image
- Mirror: Mirrors the rotated image at the borders. This provides the most
  natural effect on photos.

+-------------------------------------------------------------------------------
|References
+-------------------------------------------------------------------------------
None

+-------------------------------------------------------------------------------
|Known Issues
+-------------------------------------------------------------------------------
None

+-------------------------------------------------------------------------------
| History
+-------------------------------------------------------------------------------
1.0 (16.5.2015)
- First release

