示例#1
0
        private void PointView(int index)
        {
            Point tempPoint2;

            foreach (Point tempPoint in pointArray[index])
            {
                tempPoint2 = tempPoint;
                tempPoint.Offset(-(int)(2 * lineWidth), -(int)(2 * lineWidth));
                tempPoint2.Offset((int)(2 * lineWidth), (int)(2 * lineWidth));
                pointViewList.Add(new DHollowRectangle(new Point[] { tempPoint, tempPoint2 }, Color.DarkRed, 1));
                tempPoint.Offset((int)(2 * lineWidth), (int)(2 * lineWidth));
            }
        }
示例#2
0
        private void DrawRectangle(Graphics displayGraphics, Rectangle rec)
        {
            //Rectangle rec = new Rectangle(140, 130, 100, 60);

            displayGraphics.DrawRectangle(new Pen(newColor, lineWidth), rec);


            regionCollection.Add(new Region(rec));  //一定要先调用Rect,改变起点、终点
            drawImageType.Add(ImageType.Rectangle);
            tempPointArray = new Point[4] {
                new Point(rec.X, rec.Y), new Point(rec.X + rec.Width, rec.Y + rec.Height),
                new Point(rec.X + rec.Width, rec.Y), new Point(rec.X, rec.Y + rec.Height)
            };
            pointArray.Add(tempPointArray);

            Point2Region(tempPointArray);
            regionArrayCollection.Add(tempRegion);

            drawingList.Add(new DHollowRectangle(tempPointArray, newColor, lineWidth));
            //this.statusBar.Panels[0].Text = "PickUp";
            newType = ImageType.Pick;
        }