فهرست منبع

ComPDFKit.Tools(win) - 默认红色100%不透明Markup

liuaoran 6 روز پیش
والد
کامیت
7c1408cd50

+ 1 - 1
Demo/Examples/ComPDFKit.Tool/SettingParam/AnnotParam.cs

@@ -23,7 +23,7 @@ namespace ComPDFKit.Tool
         {
             get;
             set;
-        }
+        } = 255;
         public virtual bool CopyTo(AnnotParam transfer)
         {
             if (transfer == null)

+ 5 - 5
Demo/Examples/ComPDFKit.Tool/SettingParam/AnnotParam/HighlightParam.cs

@@ -6,17 +6,17 @@ using System.Windows.Media;
 
 namespace ComPDFKit.Tool
 {
-	public class HighlightParam:AnnotParam
+    public class HighlightParam : AnnotParam
     {
 
-        public  HighlightParam()
+        public HighlightParam()
         {
             CurrentType = C_ANNOTATION_TYPE.C_ANNOTATION_HIGHLIGHT;
         }
 
-        public byte[] HighlightColor { get; set; }
+        public byte[] HighlightColor { get; set; } = new byte[3] { 255, 0, 0 };
 
-        public List<CRect> QuardRects {  get; set; }
+        public List<CRect> QuardRects { get; set; }
 
         public override bool CopyTo(AnnotParam transfer)
         {
@@ -31,7 +31,7 @@ namespace ComPDFKit.Tool
                 return false;
             }
 
-            if(HighlightColor!=null )
+            if (HighlightColor != null)
             {
                 highlightTransfer.HighlightColor = (byte[])HighlightColor.Clone();
             }

+ 1 - 1
Demo/Examples/ComPDFKit.Tool/SettingParam/AnnotParam/SquigglyParam.cs

@@ -12,7 +12,7 @@ namespace ComPDFKit.Tool
         {
             CurrentType = C_ANNOTATION_TYPE.C_ANNOTATION_SQUIGGLY;
         }
-        public byte[] SquigglyColor { get; set; }
+        public byte[] SquigglyColor { get; set; } = new byte[3] { 255, 0, 0 };
 
         public List<CRect> QuardRects { get; set; }
 

+ 1 - 1
Demo/Examples/ComPDFKit.Tool/SettingParam/AnnotParam/StrikeoutParam.cs

@@ -12,7 +12,7 @@ namespace ComPDFKit.Tool
         {
             CurrentType = C_ANNOTATION_TYPE.C_ANNOTATION_STRIKEOUT;
         }
-		public byte[] StrikeoutColor { get; set; }
+		public byte[] StrikeoutColor { get; set; } = new byte[3] { 255, 0, 0 };
 
 		public List<CRect> QuardRects { get; set; }
 

+ 30 - 30
Demo/Examples/ComPDFKit.Tool/SettingParam/AnnotParam/UnderlineParam.cs

@@ -6,46 +6,46 @@ using System.Windows.Media;
 
 namespace ComPDFKit.Tool
 {
-	public class UnderlineParam:AnnotParam
-	{
-		public UnderlineParam ()
+    public class UnderlineParam : AnnotParam
+    {
+        public UnderlineParam()
         {
             CurrentType = C_ANNOTATION_TYPE.C_ANNOTATION_UNDERLINE;
         }
-		public byte[] UnderlineColor { get; set; }
+        public byte[] UnderlineColor { get; set; } = new byte[3] { 255, 0, 0 };
 
-		public List<CRect> QuardRects { get; set; }
+        public List<CRect> QuardRects { get; set; }
 
-		public override bool CopyTo(AnnotParam transfer)
-		{
-			UnderlineParam underlineTransfer = transfer as UnderlineParam;
-			if (underlineTransfer == null)
-			{
-				return false;
-			}
+        public override bool CopyTo(AnnotParam transfer)
+        {
+            UnderlineParam underlineTransfer = transfer as UnderlineParam;
+            if (underlineTransfer == null)
+            {
+                return false;
+            }
 
-			if (!base.CopyTo(underlineTransfer))
-			{
-				return false;
-			}
+            if (!base.CopyTo(underlineTransfer))
+            {
+                return false;
+            }
 
-			if(UnderlineColor != null)
-			{
+            if (UnderlineColor != null)
+            {
                 underlineTransfer.UnderlineColor = (byte[])UnderlineColor.Clone();
             }
 
-			if (QuardRects != null)
-			{
-				List<CRect> rectList = new List<CRect>();
-				foreach (CRect saveRect in QuardRects)
-				{
-					rectList.Add(saveRect);
-				}
+            if (QuardRects != null)
+            {
+                List<CRect> rectList = new List<CRect>();
+                foreach (CRect saveRect in QuardRects)
+                {
+                    rectList.Add(saveRect);
+                }
 
-				underlineTransfer.QuardRects = rectList;
-			}
+                underlineTransfer.QuardRects = rectList;
+            }
 
-			return true;
-		}
-	}
+            return true;
+        }
+    }
 }