mirror of
https://github.com/Geckon01/Watermark.Net.git
synced 2026-06-17 00:27:47 +00:00
Added rotation support for image watermark
This commit is contained in:
@@ -25,7 +25,7 @@ namespace UnitTest
|
||||
Font = availableFont.CreateFont(1),
|
||||
Text = "Test",
|
||||
Style = { Color = Color.White },
|
||||
Layout = { Position = ImagePosition.BottomCenter , RotateAngle = 90 }
|
||||
Layout = { Position = ImagePosition.BottomCenter, RotateAngle = 45 }
|
||||
};
|
||||
|
||||
var resultedImage = watermarker.ProcessImage("TestImages/2.png", "test/text", watermark);
|
||||
@@ -105,7 +105,7 @@ namespace UnitTest
|
||||
Font = availableFont.CreateFont(1),
|
||||
Text = "Test",
|
||||
Style = { Color = Color.White },
|
||||
Layout = { Position = ImagePosition.BottomCenter , RotateAngle = 90 }
|
||||
Layout = { Position = ImagePosition.BottomCenter, RotateAngle = 45 }
|
||||
};
|
||||
|
||||
var resultedImage = pipeline.ProcessImage("TestImages/2.png", "test/pipeline/text", watermark);
|
||||
@@ -123,7 +123,7 @@ namespace UnitTest
|
||||
|
||||
var watermark = new ImageWatermark {
|
||||
ImagePath = "TestImages/sample_wm.png",
|
||||
Layout = { Position = ImagePosition.Center, Scale = 1 },
|
||||
Layout = { Position = ImagePosition.Center, Scale = 1, RotateAngle = 45 },
|
||||
Style = { Opacity = 1 }
|
||||
};
|
||||
|
||||
@@ -150,7 +150,7 @@ namespace UnitTest
|
||||
Text = "Test",
|
||||
Font = availableFont.CreateFont(1),
|
||||
Style = { Color = Rgba32.ParseHex("FFFFFF50"), Pave = true },
|
||||
Layout = { Scale = 1f, Position = ImagePosition.TopLeft }
|
||||
Layout = { Scale = 1f, Position = ImagePosition.TopLeft, RotateAngle = 45 }
|
||||
};
|
||||
|
||||
var results = pipeline.ProcessDirectory("TestImages", "test/pipeline/text/dir", watermark);
|
||||
@@ -167,7 +167,7 @@ namespace UnitTest
|
||||
|
||||
var watermark = new ImageWatermark {
|
||||
ImagePath = "TestImages/sample_wm.png",
|
||||
Layout = { Position = ImagePosition.Center, Scale = 1},
|
||||
Layout = { Position = ImagePosition.Center, Scale = 1, RotateAngle = 45},
|
||||
Style = { Pave = true, Opacity = 1}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user