Exemplo n.º 1
0
        public void SetHotspot(PointPositionTypes x, PointPositionTypes y)
        {
            int pX = 0;
            int pY = 0;

            switch (x)
            {
            case PointPositionTypes.Middle:
                pX -= Size.Width / 2;
                break;

            case PointPositionTypes.End:
                pX -= Size.Width;
                break;
            }

            switch (y)
            {
            case PointPositionTypes.Middle:
                pY -= Size.Height / 2;
                break;

            case PointPositionTypes.End:
                pY -= Size.Height;
                break;
            }

            HotSpot = new Point(pX, pY);
        }
Exemplo n.º 2
0
        public void SetHotspot(PointPositionTypes x, PointPositionTypes y)
        {
            int pX = 0;
            int pY = 0;

            switch (x)
            {
                case PointPositionTypes.Middle:
                    pX -= Size.Width / 2;
                    break;
                case PointPositionTypes.End:
                    pX -= Size.Width;
                    break;
            }

            switch (y)
            {
                case PointPositionTypes.Middle:
                    pY -= Size.Height / 2;
                    break;
                case PointPositionTypes.End:
                    pY -= Size.Height;
                    break;
            }

            HotSpot = new Point(pX, pY);
        }