mirror of
https://github.com/greenshot/greenshot
synced 2025-08-14 02:37:03 -07:00
Moved check for OutputPrintInverted & the conversion from the PrintHelper to the PrinterDestination, this way it's all on one location.
git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@2468 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
parent
360c4d45c7
commit
7573373a5d
2 changed files with 6 additions and 7 deletions
|
@ -118,6 +118,11 @@ namespace Greenshot.Destinations {
|
|||
// Set the color reducing if needed, this should change the 24/32-> 8 (or later even 1) bpp
|
||||
// printOutputSettings.ReduceColors = true;
|
||||
|
||||
// Moved this from the PrintHelper, the invert effect should probably be the last!
|
||||
if (conf.OutputPrintInverted) {
|
||||
printOutputSettings.Effects.Add(new InvertEffect());
|
||||
}
|
||||
|
||||
Image imageToPrint;
|
||||
Boolean disposeImage = ImageOutput.CreateImageFromSurface(surface, printOutputSettings, out imageToPrint);
|
||||
try {
|
||||
|
|
|
@ -213,13 +213,7 @@ namespace Greenshot.Helpers {
|
|||
e.Graphics.DrawString(footerString, f, Brushes.Black, pageRect.Width / 2 - (footerStringWidth / 2), pageRect.Height);
|
||||
}
|
||||
}
|
||||
if (conf.OutputPrintInverted) {
|
||||
using (Bitmap negativeBitmap = ImageHelper.CreateNegative((Bitmap)image)) {
|
||||
e.Graphics.DrawImage(negativeBitmap, printRect, imageRect, GraphicsUnit.Pixel);
|
||||
}
|
||||
} else {
|
||||
e.Graphics.DrawImage(image, printRect, imageRect, GraphicsUnit.Pixel);
|
||||
}
|
||||
e.Graphics.DrawImage(image, printRect, imageRect, GraphicsUnit.Pixel);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue