Beispiel #1
0
 public override Document ConvertDocument(DocumentInfo targetDocumentInfo, Pablo.Handler handler)
 {
     if (handler != null && targetDocumentInfo.ID == Info.ID && Math.Abs(handler.Zoom - 1f) > 0.001f)
     {
         var doc = (ImageDocument)targetDocumentInfo.Create();
         doc.Image = new Bitmap(Image, handler.DrawSize.Width, handler.DrawSize.Height, ImageInterpolation.High);
         return(doc);
     }
     return(base.ConvertDocument(targetDocumentInfo, handler));
 }
Beispiel #2
0
        public void Load(Stream fs, Document document, Pablo.Handler handler)
        {
            ImageDocument doc = (ImageDocument)document;

            doc.Image = new Bitmap(fs);
        }
Beispiel #3
0
        protected override void SaveStream(Stream stream, Format format, Pablo.Handler handler)
        {
            var formatImage = (FormatImage)format;

            formatImage.Save(stream, this);
        }
Beispiel #4
0
        protected override void LoadStream(Stream stream, Format format, Pablo.Handler handler)
        {
            var formatImage = (FormatImage)format;

            formatImage.Load(stream, this, handler);
        }