public override int Close(IntPtr handle, IntPtr device)
        {
            if (_destImage != null)
            {
                _destImage.Dispose(); _destImage = null;
            }

            return(0);
        }
コード例 #2
0
        public override int Close(IntPtr handle, IntPtr device)
        {
            if (_destImage != null)
            {
                _destImage.Dispose(); _destImage = null;
            }

            return 0;
        }
        public override int Presize(IntPtr handle, IntPtr device, int width, int height, int raster, uint format)
        {
            _srcFormat = format;

            if (_destImage != null)
            {
                _destImage.Dispose(); _destImage = null;
            }

            _destImage = GhostscriptViewerImage.Create(width, height, raster, PixelFormat.Format24bppRgb);

            return(0);
        }
コード例 #4
0
        public override int Size(IntPtr handle, IntPtr device, int width, int height, int raster, uint format, IntPtr pimage)
        {
            _srcStride = raster;
            _srcFormat = format;
            _srcImage  = pimage;

            if (_destImage != null)
            {
                _destImage.Dispose(); _destImage = null;
            }

            _destImage = GhostscriptViewerImage.Create(width, height, raster, PixelFormat.Format24bppRgb);

            _viewer.RaiseDisplaySize(new GhostscriptViewerViewEventArgs(_destImage, new Rectangle(0, 0, width, height)));

            return(0);
        }
コード例 #5
0
 internal GhostscriptViewerViewEventArgs(GhostscriptViewerImage image, Rectangle mediaBox)
 {
     _image    = image;
     _mediaBox = mediaBox;
 }
コード例 #6
0
        public override int Presize(IntPtr handle, IntPtr device, int width, int height, int raster, uint format)
        {
            _srcFormat = format;

            if (_destImage != null)
            {
                _destImage.Dispose(); _destImage = null;
            }

            _destImage = GhostscriptViewerImage.Create(width, height, raster, PixelFormat.Format24bppRgb);

            return 0;
        }
コード例 #7
0
        public override int Size(IntPtr handle, IntPtr device, int width, int height, int raster, uint format, IntPtr pimage)
        {
            _srcStride = raster;
            _srcFormat = format;
            _srcImage = pimage;

            if (_destImage != null)
            {
                _destImage.Dispose(); _destImage = null;
            }

            _destImage = GhostscriptViewerImage.Create(width, height, raster, PixelFormat.Format24bppRgb);

            _viewer.FormatHandler.ShowPagePostScriptCommandInvoked = false; 

            _viewer.RaiseDisplaySize(new GhostscriptViewerViewEventArgs(_destImage, new Rectangle(0, 0, width, height)));

            return 0;
        }
コード例 #8
0
 internal GhostscriptViewerViewEventArgs(GhostscriptViewerImage image, Rectangle mediaBox)
 {
     _image = image;
     _mediaBox = mediaBox;
 }
コード例 #9
0
 public static GhostscriptViewerImage Create(int width, int height, int stride, PixelFormat format)
 {
     GhostscriptViewerImage gvi = new GhostscriptViewerImage(width, height, stride, format);
     return gvi;
 }
コード例 #10
0
        public static GhostscriptViewerImage Create(int width, int height, int stride, PixelFormat format)
        {
            GhostscriptViewerImage gvi = new GhostscriptViewerImage(width, height, stride, format);

            return(gvi);
        }