Пример #1
0
        public int SnapAtHalfY()
        {
            var half   = (_zone.Bottom - _zone.Top) / 2;
            var pixelY = _snapY.DataToPixelWithoutSnapping(_zone.Top + half);

            return(_snapY.PixelToDataWithSnapping(pixelY, _zone.Top, _zone.Bottom));
        }
Пример #2
0
        public int SnapAtHalfX()
        {
            var half   = (_zone.Right - _zone.Left) / 2;
            var pixelX = _snapX.DataToPixelWithoutSnapping(_zone.Left + half);

            return(_snapX.PixelToDataWithSnapping(pixelX, _zone.Left, _zone.Right));
        }