mirror of
https://github.com/greenshot/greenshot
synced 2025-08-19 21:13:23 -07:00
Added settings forms for DropShadowEffect & TornEdgeEffect
git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@2380 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
parent
6579d49d49
commit
38de4875e0
10 changed files with 696 additions and 31 deletions
|
@ -57,35 +57,36 @@ namespace Greenshot.Core {
|
|||
get;
|
||||
set;
|
||||
}
|
||||
public Bitmap Apply(Bitmap sourceBitmap, out Point offsetChange) {
|
||||
public virtual Bitmap Apply(Bitmap sourceBitmap, out Point offsetChange) {
|
||||
return ImageHelper.CreateShadow(sourceBitmap, Darkness, ShadowSize, ShadowOffset, out offsetChange, PixelFormat.Format32bppArgb); //Image.PixelFormat);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// TornEdgeEffect
|
||||
/// TornEdgeEffect extends on DropShadowEffect
|
||||
/// </summary>
|
||||
public class TornEdgeEffect : IEffect {
|
||||
public TornEdgeEffect() {
|
||||
Darkness = 1f;
|
||||
public class TornEdgeEffect : DropShadowEffect {
|
||||
public TornEdgeEffect() : base() {
|
||||
ShadowSize = 7;
|
||||
ShadowOffset = new Point(-1, -1);
|
||||
ToothHeight = 12;
|
||||
HorizontalToothRange = 20;
|
||||
VerticalToothRange = 20;
|
||||
}
|
||||
public float Darkness {
|
||||
public int ToothHeight {
|
||||
get;
|
||||
set;
|
||||
}
|
||||
public int ShadowSize {
|
||||
public int HorizontalToothRange {
|
||||
get;
|
||||
set;
|
||||
}
|
||||
public Point ShadowOffset {
|
||||
public int VerticalToothRange {
|
||||
get;
|
||||
set;
|
||||
}
|
||||
public Bitmap Apply(Bitmap sourceBitmap, out Point offsetChange) {
|
||||
using (Bitmap tmpTornImage = ImageHelper.CreateTornEdge(sourceBitmap)) {
|
||||
return ImageHelper.CreateShadow(tmpTornImage, Darkness, ShadowSize, ShadowOffset, out offsetChange, PixelFormat.Format32bppArgb); //Image.PixelFormat);
|
||||
public override Bitmap Apply(Bitmap sourceBitmap, out Point offsetChange) {
|
||||
using (Bitmap tmpTornImage = ImageHelper.CreateTornEdge(sourceBitmap, ToothHeight, HorizontalToothRange, VerticalToothRange)) {
|
||||
return ImageHelper.CreateShadow(tmpTornImage, Darkness, ShadowSize, ShadowOffset, out offsetChange, PixelFormat.Format32bppArgb);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue