1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- using ComPDFKit.PDFAnnotation;
- using compdfkit_tools.PDFControl;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows.Media;
- namespace compdfkit_tools.Data
- {
- public enum AnnotationType
- {
- None = 0,
- Highlight,
- Underline,
- Strikeout,
- Squiggly,
- Freetext,
- Note,
- Circle,
- Square,
- Arrow,
- Line,
- Stamp,
- Signature,
- Link,
- Sound
- }
- public static class CPDFAnnotationDictionary
- {
- public static Dictionary<string, AnnotationType> GetAnnotationFromTag = new Dictionary<string, AnnotationType>() {
- { "Highlight", AnnotationType.Highlight },
- { "Underline", AnnotationType.Underline },
- { "Strikeout", AnnotationType.Strikeout },
- { "Squiggly", AnnotationType.Squiggly },
- { "Square", AnnotationType.Square },
- { "Circle", AnnotationType.Circle },
- { "Line", AnnotationType.Line },
- { "Arrow", AnnotationType.Arrow }
- };
- }
- public abstract class CPDFAnnotationData
- {
- public AnnotationType AnnotationProperties;
- public string Note = string.Empty;
- public string Author = "ComPDFKit";
- public bool IsLocked = false;
- }
- public class CPDFMarkupData : CPDFAnnotationData
- {
- public double Opacity = 1;
- public Color Color = Color.FromRgb(255, 0, 0);
- }
- public class CPDFShapeData : CPDFAnnotationData
- {
- public Color BorderColor = Color.FromRgb(255, 0, 0);
- public Color FillColor = Color.FromRgb(255, 255, 255);
- public double Opacity = 1;
- public double Thickness = 1;
- public int DashSpacing = 1;
- }
- public class CPDFLineShapeData : CPDFAnnotationData
- {
- public Color BorderColor = Color.FromRgb(255, 0, 0);
- public C_LINE_TYPE HeadLineType = C_LINE_TYPE.LINETYPE_NONE;
- public C_LINE_TYPE TailLineType = C_LINE_TYPE.LINETYPE_NONE;
- public double Opacity = 1;
- public double Thickness = 1;
- public int DashSpacing = 1;
- }
- }
|