mirror of
https://github.com/greenshot/greenshot
synced 2025-07-14 17:13:44 -07:00
Added key handling for the effects and added a clear operation. Also some code cleanup.
git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@2360 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
parent
82eddefe4e
commit
e148f2103c
3 changed files with 70 additions and 38 deletions
|
@ -1115,7 +1115,11 @@ namespace GreenshotPlugin.Core {
|
|||
/// <param name="backgroundColor">The color to fill with, or Color.Empty to take the default depending on the pixel format</param>
|
||||
/// <returns></returns>
|
||||
public static Bitmap CreateEmptyLike(Bitmap sourceBitmap, Color backgroundColor) {
|
||||
return CreateEmpty(sourceBitmap.Width, sourceBitmap.Height, sourceBitmap.PixelFormat, backgroundColor, sourceBitmap.HorizontalResolution, sourceBitmap.VerticalResolution);
|
||||
PixelFormat pixelFormat = sourceBitmap.PixelFormat;
|
||||
if (backgroundColor.A < 255) {
|
||||
pixelFormat = PixelFormat.Format32bppArgb;
|
||||
}
|
||||
return CreateEmpty(sourceBitmap.Width, sourceBitmap.Height, pixelFormat, backgroundColor, sourceBitmap.HorizontalResolution, sourceBitmap.VerticalResolution);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue