B2016-191 The Watermarks on landscaped sections that also rotates the page header (pagelist) need to be rotated back.

This commit is contained in:
John Jenko 2016-09-26 19:06:44 +00:00
parent 4ca2769c50
commit 564393b3ac

View File

@ -1140,6 +1140,15 @@ namespace Volian.Svg.Library
if (!AllowAllWatermarks && !AllowedWatermarks.Contains(Watermark)) return;
cb.SaveState();
if (_WatermarkLayer != null) cb.BeginLayer(_WatermarkLayer);
if (IsLandscape)
{
// The watermark needs to be rotated back for landscape pagelist - B2016-191
//double a = -33 * (Math.PI / 180);
//System.Drawing.Drawing2D.Matrix myMatrix = new System.Drawing.Drawing2D.Matrix((float)Math.Cos(a), (float)Math.Sin(a), (float)-Math.Sin(a), (float)Math.Cos(a), -60, 320);
double a = -90 * (Math.PI / 180);
System.Drawing.Drawing2D.Matrix myMatrix = new System.Drawing.Drawing2D.Matrix((float)Math.Cos(a), (float)Math.Sin(a), (float)-Math.Sin(a), (float)Math.Cos(a), 0, 800);
cb.Transform(myMatrix);
}
SvgWatermark myWatermark = new SvgWatermark(cb, Watermark, System.Drawing.Color.Blue, .15F);
//myWatermark.SetSquareDotPattern(.7F);
myWatermark.Draw();