CalculateGraphicsPathFromBitmap() public static method

public static CalculateGraphicsPathFromBitmap ( Bitmap bitmap ) : GraphicsPath
bitmap System.Drawing.Bitmap
return System.Drawing.Drawing2D.GraphicsPath
Esempio n. 1
0
                public VS2012LightPaneIndicator(VS2012LightTheme theme)
                {
                    SizeMode = PictureBoxSizeMode.AutoSize;
                    Image    = _bitmapPaneDiamond;
                    Region   = new Region(DisplayingGraphicsPath);

                    _bitmapPaneDiamond             = theme.ImageService.Dockindicator_PaneDiamond;
                    _bitmapPaneDiamondLeft         = theme.ImageService.Dockindicator_PaneDiamond_Fill;
                    _bitmapPaneDiamondRight        = theme.ImageService.Dockindicator_PaneDiamond_Fill;
                    _bitmapPaneDiamondTop          = theme.ImageService.Dockindicator_PaneDiamond_Fill;
                    _bitmapPaneDiamondBottom       = theme.ImageService.Dockindicator_PaneDiamond_Fill;
                    _bitmapPaneDiamondFill         = theme.ImageService.Dockindicator_PaneDiamond_Fill;
                    _bitmapPaneDiamondHotSpot      = theme.ImageService.Dockindicator_PaneDiamond_Hotspot;
                    _bitmapPaneDiamondHotSpotIndex = theme.ImageService.DockIndicator_PaneDiamond_HotspotIndex;
                    _displayingGraphicsPath        = DrawHelper.CalculateGraphicsPathFromBitmap(_bitmapPaneDiamond);
                }
        public VS2005MultithreadingPaneIndicator()
        {
            lock (typeof(Resources))
            {
                _bitmapPaneDiamond             = (Bitmap)Resources.DockIndicator_PaneDiamond.Clone();
                _bitmapPaneDiamondLeft         = (Bitmap)Resources.DockIndicator_PaneDiamond_Left.Clone();
                _bitmapPaneDiamondRight        = (Bitmap)Resources.DockIndicator_PaneDiamond_Right.Clone();
                _bitmapPaneDiamondTop          = (Bitmap)Resources.DockIndicator_PaneDiamond_Top.Clone();
                _bitmapPaneDiamondBottom       = (Bitmap)Resources.DockIndicator_PaneDiamond_Bottom.Clone();
                _bitmapPaneDiamondFill         = (Bitmap)Resources.DockIndicator_PaneDiamond_Fill.Clone();
                _bitmapPaneDiamondHotSpot      = (Bitmap)Resources.DockIndicator_PaneDiamond_HotSpot.Clone();
                _bitmapPaneDiamondHotSpotIndex = (Bitmap)Resources.DockIndicator_PaneDiamond_HotSpotIndex.Clone();
            }

            _displayingGraphicsPath = DrawHelper.CalculateGraphicsPathFromBitmap(_bitmapPaneDiamond);

            SizeMode = PictureBoxSizeMode.AutoSize;
            Image    = _bitmapPaneDiamond;
            Region   = new Region(DisplayingGraphicsPath);
        }