예제 #1
0
        public IImageProvider GetImageProvider(bool IncludeCursor, out Func <Point, Point> Transform)
        {
            var region = _platformServices.DesktopRectangle;

            Transform = P => new Point(P.X - region.X, P.Y - region.Y);

            return(_platformServices.GetRegionProvider(region, IncludeCursor));
        }
예제 #2
0
        public IImageProvider GetImageProvider(bool IncludeCursor, out Func <Point, Point> Transform)
        {
            Transform = P =>
            {
                var region = _selector.SelectedRegion.Location;

                return(new Point(P.X - region.X, P.Y - region.Y));
            };

            return(_platformServices.GetRegionProvider(_selector.SelectedRegion,
                                                       IncludeCursor,
                                                       () => _selector.SelectedRegion.Location));
        }
        public AroundMouseImageProvider(int Width,
                                        int Height,
                                        int Margin,
                                        IPlatformServices PlatformServices,
                                        bool IncludeCursor)
        {
            _platformServices = PlatformServices;
            _margin           = Margin;

            this.Width  = Width;
            this.Height = Height;

            _regionAroundMouse = new Rectangle(0, 0, Width, Height);

            PointTransform = P => new Point(P.X - _regionAroundMouse.X, P.Y - _regionAroundMouse.Y);

            _regionProvider = PlatformServices.GetRegionProvider(_regionAroundMouse,
                                                                 IncludeCursor,
                                                                 () => _regionAroundMouse.Location);
        }
예제 #4
0
 public IImageProvider GetImageProvider(bool IncludeCursor)
 {
     return(_platformServices.GetRegionProvider(Screen.Rectangle, IncludeCursor));
 }
예제 #5
0
파일: RegionItem.cs 프로젝트: zz110/Captura
 public IImageProvider GetImageProvider(bool IncludeCursor)
 {
     return(_platformServices.GetRegionProvider(_selector.SelectedRegion,
                                                IncludeCursor,
                                                () => _selector.SelectedRegion.Location));
 }
예제 #6
0
        public IImageProvider GetImageProvider(bool IncludeCursor)
        {
            var region = _platformServices.DesktopRectangle;

            return(_platformServices.GetRegionProvider(region, IncludeCursor));
        }
예제 #7
0
        public IImageProvider GetImageProvider(bool IncludeCursor, out Func <Point, Point> Transform)
        {
            Transform = P => new Point(P.X - Screen.Rectangle.X, P.Y - Screen.Rectangle.Y);

            return(_platformServices.GetRegionProvider(Screen.Rectangle, IncludeCursor));
        }