Пример #1
0
        Rectangle CreateRectForRubberEdge()
        {
            var    rect = new BBox(rubberLineStart, RubberLineEnd);
            double w    = gViewer.LineThicknessForEditing;
            var    del  = new P2(-w, w);

            rect.Add(rect.LeftTop + del);
            rect.Add(rect.RightBottom - del);
            return(GViewer.CreateScreenRectFromTwoCornersInTheSource(rect.LeftTop, rect.RightBottom));
        }
Пример #2
0
        internal void StopDrawingRubberEdge()
        {
            if (CurrentRubberEdge != null)
            {
                GViewer.Invalidate(
                    GViewer.CreateScreenRectFromTwoCornersInTheSource(
                        CurrentRubberEdge.BoundingBox.LeftTop,
                        CurrentRubberEdge.BoundingBox.RightBottom));
            }

            CurrentRubberEdge = null;
        }
Пример #3
0
        internal void DrawRubberEdge(EdgeGeometry edgeGeometry)
        {
            BBox rectToInvalidate = edgeGeometry.BoundingBox;

            if (CurrentRubberEdge != null)
            {
                BBox b = CurrentRubberEdge.BoundingBox;
                rectToInvalidate.Add(b);
            }
            CurrentRubberEdge = edgeGeometry;
            GViewer.Invalidate(GViewer.CreateScreenRectFromTwoCornersInTheSource(rectToInvalidate.LeftTop,
                                                                                 rectToInvalidate.RightBottom));
        }