Ejemplo n.º 1
0
        public PointF GetMouseCenterOfCandidates(FullGridMap map)
        {
            int min = map.SetAt(0);
            int max = map.SetAt(^ 1);

            var(x1, y1) = GetMousePointInCenter(min / 9, min % 9);
            var(x2, y2) = GetMousePointInCenter(max / 9, max % 9);
            return(new PointF((x1 + x2) / 2, (y1 + y2) / 2));
        }
Ejemplo n.º 2
0
        public RectangleF GetMouseRectangleOfCandidates(FullGridMap map)
        {
            var(cw, ch) = CandidateSize;
            int min = map.SetAt(0);
            int max = map.SetAt(^ 1);
            var pt1 = GetMousePointInCenter(min / 9, min % 9);
            var pt2 = GetMousePointInCenter(max / 9, max % 9);

            pt1.X -= cw / 2;
            pt1.Y -= ch / 2;
            pt2.X += cw / 2;
            pt2.Y += ch / 2;
            return(RectangleEx.CreateInstance(pt1, pt2));
        }