Пример #1
0
 /// <summary>
 /// Constructs an Image object duplicate.
 /// </summary>
 /// <param name="image">another Image object.</param>
 public Image(Image image)
     : base(image)
 {
     this.type = image.type;
     this.url = image.url;
     this.alignment = image.alignment;
     this.alt = image.alt;
     this.absoluteX = image.absoluteX;
     this.absoluteY = image.absoluteY;
     this.plainWidth = image.plainWidth;
     this.plainHeight = image.plainHeight;
     this.scaledWidth = image.scaledWidth;
     this.scaledHeight = image.scaledHeight;
     this.rotationRadians = image.rotationRadians;
     this.indentationLeft = image.indentationLeft;
     this.indentationRight = image.indentationRight;
     this.colorspace = image.colorspace;
     this.rawData = image.rawData;
     this.template = image.template;
     this.bpc = image.bpc;
     this.transparency = image.transparency;
     this.mySerialId = image.mySerialId;
     this.invert = image.invert;
     this.dpiX = image.dpiX;
     this.dpiY = image.dpiY;
     this.mask = image.mask;
     this.imageMask = image.imageMask;
     this.interpolation = image.interpolation;
     this.annotation = image.annotation;
     this.profile = image.profile;
     this.deflated = image.deflated;
     this.additional = image.additional;
     this.smask = image.smask;
     this.XYRatio = image.XYRatio;
     this.originalData = image.originalData;
     this.originalType = image.originalType;
     this.spacingAfter = image.spacingAfter;
     this.spacingBefore = image.spacingBefore;
     this.widthPercentage = image.widthPercentage;
     this.layer = image.layer;
     this.initialRotation = image.initialRotation;
     this.directReference = image.directReference;
 }
Пример #2
0
 public static PdfAnnotation ConvertAnnotation(PdfWriter writer, Annotation annot, Rectangle defaultRect)
 {
     switch (annot.AnnotationType) {
         case Annotation.URL_NET:
             return new PdfAnnotation(writer, annot.GetLlx(), annot.GetLly(), annot.GetUrx(), annot.GetUry(), new PdfAction((Uri) annot.Attributes[Annotation.URL]));
         case Annotation.URL_AS_STRING:
             return new PdfAnnotation(writer, annot.GetLlx(), annot.GetLly(), annot.GetUrx(), annot.GetUry(), new PdfAction((String) annot.Attributes[Annotation.FILE]));
         case Annotation.FILE_DEST:
             return new PdfAnnotation(writer, annot.GetLlx(), annot.GetLly(), annot.GetUrx(), annot.GetUry(), new PdfAction((String) annot.Attributes[Annotation.FILE], (String) annot.Attributes[Annotation.DESTINATION]));
         case Annotation.SCREEN:
             bool[] sparams = (bool[])annot.Attributes[Annotation.PARAMETERS];
             String fname = (String) annot.Attributes[Annotation.FILE];
             String mimetype = (String) annot.Attributes[Annotation.MIMETYPE];
             PdfFileSpecification fs;
             if (sparams[0])
                 fs = PdfFileSpecification.FileEmbedded(writer, fname, fname, null);
             else
                 fs = PdfFileSpecification.FileExtern(writer, fname);
             PdfAnnotation ann = PdfAnnotation.CreateScreen(writer, new Rectangle(annot.GetLlx(), annot.GetLly(), annot.GetUrx(), annot.GetUry()),
                     fname, fs, mimetype, sparams[1]);
             return ann;
         case Annotation.FILE_PAGE:
             return new PdfAnnotation(writer, annot.GetLlx(), annot.GetLly(), annot.GetUrx(), annot.GetUry(), new PdfAction((String) annot.Attributes[Annotation.FILE], (int)annot.Attributes[Annotation.PAGE]));
         case Annotation.NAMED_DEST:
             return new PdfAnnotation(writer, annot.GetLlx(), annot.GetLly(), annot.GetUrx(), annot.GetUry(), new PdfAction((int) annot.Attributes[Annotation.NAMED]));
         case Annotation.LAUNCH:
             return new PdfAnnotation(writer, annot.GetLlx(), annot.GetLly(), annot.GetUrx(), annot.GetUry(), new PdfAction((String) annot.Attributes[Annotation.APPLICATION],(String) annot.Attributes[Annotation.PARAMETERS],(String) annot.Attributes[Annotation.OPERATION],(String) annot.Attributes[Annotation.DEFAULTDIR]));
         default:
             return new PdfAnnotation(writer, defaultRect.Left, defaultRect.Bottom, defaultRect.Right, defaultRect.Top, new PdfString(annot.Title, PdfObject.TEXT_UNICODE), new PdfString(annot.Content, PdfObject.TEXT_UNICODE));
     }
 }
Пример #3
0
 /**
 * Constructs a RtfAnnotation based on an Annotation.
 *
 * @param doc The RtfDocument this RtfAnnotation belongs to
 * @param annotation The Annotation this RtfAnnotation is based off
 */
 public RtfAnnotation(RtfDocument doc, Annotation annotation)
     : base(doc)
 {
     title = annotation.Title;
     content = annotation.Content;
 }
Пример #4
0
 public Annotation(Annotation an)
 {
     annotationtype = an.annotationtype;
     annotationAttributes = an.annotationAttributes;
     llx = an.llx;
     lly = an.lly;
     urx = an.urx;
     ury = an.ury;
 }