123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103 |
- using ComPDFKit.Import;
- using ComPDFKit.Measure;
- using ComPDFKit.PDFAnnotation;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows.Media;
- namespace ComPDFKit.Tool
- {
- public class LineMeasureParam : AnnotParam
- {
- public LineMeasureParam()
- {
- CurrentType = C_ANNOTATION_TYPE.C_ANNOTATION_LINE;
- }
- public byte[] LineColor { get; set; }
- public float LineWidth { get; set; }
- public float[] LineDash { get; set; }
- public CPoint HeadPoint { get; set; }
- public CPoint TailPoint { get; set; }
- public C_LINE_TYPE HeadLineType { get; set; }
- public C_LINE_TYPE TailLineType { get; set; }
- public string FontName { get; set; }
- public double FontSize { get; set; }
- public byte[] FontColor { get; set; }
- public bool IsBold { get; set; }
- public bool IsItalic { get; set; }
- public C_BORDER_STYLE BorderStyle { get; set; }
- public CPDFMeasureInfo measureInfo { get; set; }
- public double LeadLength { get; set; }
- public double LeadExtension { get; set; }
- public double LeadOffset { get; set; }
- public override bool CopyTo(AnnotParam transfer)
- {
- LineMeasureParam lineTransfer = transfer as LineMeasureParam;
- if (lineTransfer == null)
- {
- return false;
- }
- if (!base.CopyTo(lineTransfer))
- {
- return false;
- }
- if (LineColor != null)
- {
- lineTransfer.LineColor = (byte[])LineColor.Clone();
- }
- if (LineDash != null)
- {
- lineTransfer.LineDash = (float[])LineDash.Clone();
- }
- if (FontColor != null)
- {
- lineTransfer.FontColor = (byte[])FontColor.Clone();
- }
- if (measureInfo != null)
- {
- CPDFMeasureInfo cPDFMeasureInfo = new CPDFMeasureInfo()
- {
- Factor = measureInfo.Factor,
- Unit = measureInfo.Unit,
- DecimalSymbol = measureInfo.DecimalSymbol,
- ThousandSymbol = measureInfo.ThousandSymbol,
- Display = measureInfo.Display,
- Precision = measureInfo.Precision,
- UnitPrefix = measureInfo.UnitPrefix,
- UnitSuffix = measureInfo.UnitSuffix,
- UnitPosition = measureInfo.UnitPosition,
- RulerBase = measureInfo.RulerBase,
- RulerBaseUnit = measureInfo.RulerBaseUnit,
- RulerTranslateUnit = measureInfo.RulerTranslateUnit,
- RulerTranslate= measureInfo.RulerTranslate,
- CaptionType = measureInfo.CaptionType,
- };
- lineTransfer.measureInfo = cPDFMeasureInfo;
- }
- lineTransfer.LineWidth = LineWidth;
- lineTransfer.HeadLineType = HeadLineType;
- lineTransfer.TailLineType = TailLineType;
- lineTransfer.FontName = FontName;
- lineTransfer.FontSize = FontSize;
- lineTransfer.IsBold = IsBold;
- lineTransfer.IsItalic = IsItalic;
- lineTransfer.HeadPoint = HeadPoint;
- lineTransfer.TailPoint = TailPoint;
- lineTransfer.BorderStyle = BorderStyle;
- lineTransfer.LeadExtension=LeadExtension;
- lineTransfer.LeadLength = LeadLength;
- lineTransfer.LeadOffset = LeadOffset;
- return true;
- }
- }
- }
|