mirror of
https://github.com/greenshot/greenshot
synced 2025-07-14 17:13:44 -07:00
Small change to allow window capture and automatically add a shadow, only inside the editor.
git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@1652 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
parent
c8fc93ee53
commit
594f8f9a0a
2 changed files with 11 additions and 2 deletions
|
@ -38,6 +38,7 @@ using Greenshot.Plugin;
|
|||
using GreenshotPlugin.Core;
|
||||
using IniFile;
|
||||
using System.Threading;
|
||||
using System.Drawing.Imaging;
|
||||
|
||||
namespace Greenshot {
|
||||
/// <summary>
|
||||
|
@ -1151,7 +1152,15 @@ namespace Greenshot {
|
|||
this.Activate();
|
||||
WindowDetails.ToForeground(this.Handle);
|
||||
if (capture!= null && capture.Image != null) {
|
||||
surface.AddBitmapContainer((Bitmap)capture.Image, 100, 100);
|
||||
bool addShadow = false;
|
||||
if (addShadow) {
|
||||
Point offset = new Point(6, 6);
|
||||
using (Bitmap shadowImage = ImageHelper.CreateShadow(capture.Image, 1f, 7, offset, PixelFormat.Format32bppArgb)) {
|
||||
surface.AddBitmapContainer(shadowImage, 100, 100);
|
||||
}
|
||||
} else {
|
||||
surface.AddBitmapContainer((Bitmap)capture.Image, 100, 100);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue