Allow negative offset in image effects

This commit is contained in:
Jaex 2018-11-05 01:02:06 +03:00
parent 1a71ed6c32
commit 9d923aeb13
2 changed files with 2 additions and 26 deletions

View file

@ -37,20 +37,8 @@ public class DrawImage : ImageEffect
[DefaultValue(ContentAlignment.BottomRight)]
public ContentAlignment Placement { get; set; }
private Point offset;
[DefaultValue(typeof(Point), "5, 5")]
public Point Offset
{
get
{
return offset;
}
set
{
offset = new Point(value.X.Min(0), value.Y.Min(0));
}
}
public Point Offset { get; set; }
[DefaultValue(true), Description("If image watermark size bigger than source image then don't draw it.")]
public bool AutoHide { get; set; }

View file

@ -40,20 +40,8 @@ public class DrawText : ImageEffect
[DefaultValue(ContentAlignment.BottomRight)]
public ContentAlignment Placement { get; set; }
private Point offset;
[DefaultValue(typeof(Point), "5, 5")]
public Point Offset
{
get
{
return offset;
}
set
{
offset = new Point(value.X.Min(0), value.Y.Min(0));
}
}
public Point Offset { get; set; }
[DefaultValue(true), Description("If text watermark size bigger than source image then don't draw it.")]
public bool AutoHide { get; set; }