示例#1
0
        /// <summary>
        /// Right mouse button is released
        /// </summary>
        /// <param name="drawArea"></param>
        /// <param name="e"></param>
        public override void OnMouseUp(DrawArea drawArea, MouseEventArgs e)
        {
            int al = drawArea.TheLayers.ActiveLayerIndex;

            if (selectMode == SelectionMode.NetSelection)
            {
                // Group selection
                drawArea.TheLayers[al].Graphics.SelectInRectangle(drawArea.NetRectangle);

                selectMode = SelectionMode.None;
                drawArea.DrawNetRectangle = false;
            }

            if (resizedObject != null)
            {
                // after resizing
                resizedObject.Normalize();
                resizedObject = null;
            }

            drawArea.Capture = false;
            drawArea.Refresh();

            if (commandChangeState != null && wasMove)
            {
                // Keep state after moving/resizing and add command to history
                commandChangeState.NewState(drawArea.TheLayers);
                drawArea.AddCommandToHistory(commandChangeState);
                commandChangeState = null;
            }
            lastPoint = drawArea.BackTrackMouse(e.Location);
        }
示例#2
0
		/// <summary>
		/// Mouse move - resize new polygon
		/// </summary>
		/// <param name="drawArea"></param>
		/// <param name="e"></param>
		public override void OnMouseMove(DrawArea drawArea, MouseEventArgs e)
		{
			drawArea.Cursor = Cursor;

			if (e.Button != MouseButtons.Left)
				return;

			if (newPolygon == null)
				return;                 // precaution

			Point point = drawArea.BackTrackMouse(new Point(e.X, e.Y));
			int distance = (e.X - lastX) * (e.X - lastX) + (e.Y - lastY) * (e.Y - lastY);

			if (distance < minDistance)
			{
				// Distance between last two points is less than minimum -
				// move last point
				newPolygon.MoveHandleTo(point, newPolygon.HandleCount);
			} else
			{
				// Add new point
				newPolygon.AddPoint(point);
				lastX = e.X;
				lastY = e.Y;
			}
			drawArea.Refresh();
		}
示例#3
0
        /// <summary>
        /// Mouse move - resize new polygon
        /// </summary>
        /// <param name="drawArea"></param>
        /// <param name="e"></param>
        public override void OnMouseMove(DrawArea drawArea, MouseEventArgs e)
        {
            drawArea.Cursor = Cursor;

            if (e.Button != MouseButtons.Left)
            {
                return;
            }

            if (newPolygon == null)
            {
                return;                                 // precaution
            }
            Point point    = drawArea.BackTrackMouse(new Point(e.X, e.Y));
            int   distance = (e.X - lastX) * (e.X - lastX) + (e.Y - lastY) * (e.Y - lastY);

            if (distance < minDistance)
            {
                // Distance between last two points is less than minimum -
                // move last point
                newPolygon.MoveHandleTo(point, newPolygon.HandleCount);
            }
            else
            {
                // Add new point
                newPolygon.AddPoint(point);
                lastX = e.X;
                lastY = e.Y;
            }
            drawArea.Refresh();
        }
示例#4
0
		public override void OnMouseDown(DrawArea drawArea, MouseEventArgs e)
		{
			Point p = drawArea.BackTrackMouse(new Point(e.X, e.Y));
			if (drawArea.PenType == DrawingPens.PenType.Generic)
				AddNewObject(drawArea, new DrawLine(p.X, p.Y, p.X + 1, p.Y + 1, drawArea.LineColor, drawArea.LineWidth));
			else
				AddNewObject(drawArea, new DrawLine(p.X, p.Y, p.X + 1, p.Y + 1, drawArea.PenType));
		}
示例#5
0
		public override void OnMouseDown(DrawArea drawArea, MouseEventArgs e)
		{
			Point p = drawArea.BackTrackMouse(new Point(e.X, e.Y));
			if (drawArea.CurrentPen == null)
				AddNewObject(drawArea, new DrawEllipse(p.X, p.Y, 1, 1, drawArea.LineColor, drawArea.FillColor, drawArea.DrawFilled, drawArea.LineWidth));
			else
				AddNewObject(drawArea, new DrawEllipse(p.X, p.Y, 1, 1, drawArea.PenType, drawArea.FillColor, drawArea.DrawFilled));
		}
示例#6
0
		public override void OnMouseMove(DrawArea drawArea, MouseEventArgs e)
		{
			drawArea.Cursor = Cursor;

			if (e.Button == MouseButtons.Left)
			{
				Point point = drawArea.BackTrackMouse(new Point(e.X, e.Y));
				int al = drawArea.TheLayers.ActiveLayerIndex;
				drawArea.TheLayers[al].Graphics[0].MoveHandleTo(point, 2);
				drawArea.Refresh();
			}
		}
示例#7
0
        public override void OnMouseMove(DrawArea drawArea, MouseEventArgs e)
        {
            drawArea.Cursor = Cursor;

            if (e.Button == MouseButtons.Left)
            {
                Point point = drawArea.BackTrackMouse(new Point(e.X, e.Y));
                int   al    = drawArea.TheLayers.ActiveLayerIndex;
                drawArea.TheLayers[al].Graphics[0].MoveHandleTo(point, 2);
                drawArea.Refresh();
            }
        }
示例#8
0
		public override void OnMouseUp(DrawArea drawArea, MouseEventArgs e)
		{
			Point p = drawArea.BackTrackMouse(new Point(e.X, e.Y));
			OpenFileDialog ofd = new OpenFileDialog();
			ofd.Title = "Select an Image to insert into map";
			ofd.Filter = "Bitmap (*.bmp)|*.bmp|JPEG (*.jpg)|*.jpg|Fireworks (*.png)|*.png|GIF (*.gif)|*.gif|Icon (*.ico)|*.ico|All files|*.*";
			ofd.InitialDirectory = Environment.SpecialFolder.MyPictures.ToString();
			int al = drawArea.TheLayers.ActiveLayerIndex;
			if (ofd.ShowDialog() == DialogResult.OK)
				((DrawImage)drawArea.TheLayers[al].Graphics[0]).TheImage = (Bitmap)Bitmap.FromFile(ofd.FileName);
			ofd.Dispose();
			base.OnMouseUp(drawArea, e);
		}
示例#9
0
        public override void OnMouseDown(DrawArea drawArea, MouseEventArgs e)
        {
            Point p = drawArea.BackTrackMouse(new Point(e.X, e.Y));

            if (drawArea.CurrentPen == null)
            {
                AddNewObject(drawArea, new DrawEllipse(p.X, p.Y, 1, 1, drawArea.LineColor, drawArea.FillColor, drawArea.DrawFilled, drawArea.LineWidth));
            }
            else
            {
                AddNewObject(drawArea, new DrawEllipse(p.X, p.Y, 1, 1, drawArea.PenType, drawArea.FillColor, drawArea.DrawFilled));
            }
        }
示例#10
0
        public override void OnMouseDown(DrawArea drawArea, MouseEventArgs e)
        {
            Point      p  = drawArea.BackTrackMouse(new Point(e.X, e.Y));
            TextDialog td = new TextDialog();

            if (td.ShowDialog() == DialogResult.OK)
            {
                string t = td.TheText;
                Color  c = td.TheColor;
                Font   f = td.TheFont;
                AddNewObject(drawArea, new DrawText(p.X, p.Y, t, f, c));
            }
        }
示例#11
0
        public override void OnMouseDown(DrawArea drawArea, MouseEventArgs e)
        {
            Point p = drawArea.BackTrackMouse(new Point(e.X, e.Y));

            if (drawArea.PenType == DrawingPens.PenType.Generic)
            {
                AddNewObject(drawArea, new DrawLine(p.X, p.Y, p.X + 1, p.Y + 1, drawArea.LineColor, drawArea.LineWidth));
            }
            else
            {
                AddNewObject(drawArea, new DrawLine(p.X, p.Y, p.X + 1, p.Y + 1, drawArea.PenType));
            }
        }
示例#12
0
 private bool _drawingInProcess = false;                 // Set to true when drawing
 /// <summary>
 /// Left nouse button is pressed
 /// </summary>
 /// <param name="drawArea"></param>
 /// <param name="e"></param>
 public override void OnMouseDown(DrawArea drawArea, MouseEventArgs e)
 {
     if (e.Button == MouseButtons.Right)
     {
         _drawingInProcess = false;
         newPolyLine       = null;
     }
     else
     {
         Point p = drawArea.BackTrackMouse(new Point(e.X, e.Y));
         if (drawArea.PenType == DrawingPens.PenType.Generic)
         {
             if (_drawingInProcess == false)
             {
                 newPolyLine          = new DrawPolyLine(p.X, p.Y, p.X + 1, p.Y + 1, drawArea.LineColor, drawArea.LineWidth);
                 newPolyLine.EndPoint = new Point(p.X + 1, p.Y + 1);
                 AddNewObject(drawArea, newPolyLine);
                 lastX             = e.X;
                 lastY             = e.Y;
                 _drawingInProcess = true;
             }
             else
             {
                 // Drawing is in process, so simply add a new point
                 newPolyLine.AddPoint(p);
                 newPolyLine.EndPoint = p;
             }
         }
         else
         {
             if (_drawingInProcess == false)
             {
                 newPolyLine          = new DrawPolyLine(p.X, p.Y, p.X + 1, p.Y + 1, drawArea.PenType);
                 newPolyLine.EndPoint = new Point(p.X + 1, p.Y + 1);
                 AddNewObject(drawArea, newPolyLine);
                 lastX             = e.X;
                 lastY             = e.Y;
                 _drawingInProcess = true;
             }
             else
             {
                 // Drawing is in process, so simply add a new point
                 newPolyLine.AddPoint(p);
                 newPolyLine.EndPoint = p;
             }
         }
     }
 }
示例#13
0
		/// <summary>
		/// Left nouse button is pressed
		/// </summary>
		/// <param name="drawArea"></param>
		/// <param name="e"></param>
		public override void OnMouseDown(DrawArea drawArea, MouseEventArgs e)
		{
			// Create new polygon, add it to the list
			// and keep reference to it
			Point p = drawArea.BackTrackMouse(new Point(e.X, e.Y));
			if (drawArea.PenType == DrawingPens.PenType.Generic)
				newPolygon = new DrawPolygon(p.X, p.Y, p.X + 1, p.Y + 1, drawArea.LineColor, drawArea.LineWidth);
			else
				newPolygon = new DrawPolygon(p.X, p.Y, p.X + 1, p.Y + 1, drawArea.PenType);
			// Set the minimum distance variable according to current zoom level.
			minDistance = Convert.ToInt32((15 * drawArea.Zoom) * (15 * drawArea.Zoom));

			AddNewObject(drawArea, newPolygon);
			lastX = e.X;
			lastY = e.Y;
		}
示例#14
0
        public override void OnMouseUp(DrawArea drawArea, MouseEventArgs e)
        {
            Point          p   = drawArea.BackTrackMouse(new Point(e.X, e.Y));
            OpenFileDialog ofd = new OpenFileDialog();

            ofd.Title            = "Select an Image to insert into map";
            ofd.Filter           = "Bitmap (*.bmp)|*.bmp|JPEG (*.jpg)|*.jpg|Fireworks (*.png)|*.png|GIF (*.gif)|*.gif|Icon (*.ico)|*.ico|All files|*.*";
            ofd.InitialDirectory = Environment.SpecialFolder.MyPictures.ToString();
            int al = drawArea.TheLayers.ActiveLayerIndex;

            if (ofd.ShowDialog() == DialogResult.OK)
            {
                ((DrawImage)drawArea.TheLayers[al].Graphics[0]).TheImage = (Bitmap)Bitmap.FromFile(ofd.FileName);
            }
            ofd.Dispose();
            base.OnMouseUp(drawArea, e);
        }
示例#15
0
        /// <summary>
        /// Mouse move - resize new polygon
        /// </summary>
        /// <param name="drawArea"></param>
        /// <param name="e"></param>
        public override void OnMouseMove(DrawArea drawArea, MouseEventArgs e)
        {
            drawArea.Cursor = Cursor;

            if (e.Button != MouseButtons.Left)
            {
                return;
            }

            if (newPolyLine == null)
            {
                return;                                 // precaution
            }
            Point point = drawArea.BackTrackMouse(new Point(e.X, e.Y));

            // move last point
            newPolyLine.MoveHandleTo(point, newPolyLine.HandleCount);
            drawArea.Refresh();
        }
示例#16
0
        /// <summary>
        /// Left nouse button is pressed
        /// </summary>
        /// <param name="drawArea"></param>
        /// <param name="e"></param>
        public override void OnMouseDown(DrawArea drawArea, MouseEventArgs e)
        {
            // Create new polygon, add it to the list
            // and keep reference to it
            Point p = drawArea.BackTrackMouse(new Point(e.X, e.Y));

            if (drawArea.PenType == DrawingPens.PenType.Generic)
            {
                newPolygon = new DrawPolygon(p.X, p.Y, p.X + 1, p.Y + 1, drawArea.LineColor, drawArea.LineWidth);
            }
            else
            {
                newPolygon = new DrawPolygon(p.X, p.Y, p.X + 1, p.Y + 1, drawArea.PenType);
            }
            // Set the minimum distance variable according to current zoom level.
            minDistance = Convert.ToInt32((15 * drawArea.Zoom) * (15 * drawArea.Zoom));

            AddNewObject(drawArea, newPolygon);
            lastX = e.X;
            lastY = e.Y;
        }
示例#17
0
        /// <summary>
        /// Mouse is moved.
        /// None button is pressed, ot left button is pressed.
        /// </summary>
        /// <param name="drawArea"></param>
        /// <param name="e"></param>
        public override void OnMouseMove(DrawArea drawArea, MouseEventArgs e)
        {
            Point point = drawArea.BackTrackMouse(new Point(e.X, e.Y));
            int   al    = drawArea.TheLayers.ActiveLayerIndex;

            wasMove = true;

            // set cursor when mouse button is not pressed
            if (e.Button == MouseButtons.None)
            {
                Cursor cursor = null;

                if (drawArea.TheLayers[al].Graphics != null)
                {
                    for (int i = 0; i < drawArea.TheLayers[al].Graphics.Count; i++)
                    {
                        int n = drawArea.TheLayers[al].Graphics[i].HitTest(point);

                        if (n > 0)
                        {
                            cursor = drawArea.TheLayers[al].Graphics[i].GetHandleCursor(n);
                            break;
                        }
                    }
                }

                if (cursor == null)
                {
                    cursor = Cursors.Default;
                }

                drawArea.Cursor = cursor;
                return;
            }

            if (e.Button != MouseButtons.Left)
            {
                return;
            }

            /// Left button is pressed

            // Find difference between previous and current position
            int dx = point.X - lastPoint.X;
            int dy = point.Y - lastPoint.Y;

            lastPoint.X = point.X;
            lastPoint.Y = point.Y;

            // resize
            if (selectMode == SelectionMode.Size)
            {
                if (resizedObject != null)
                {
                    resizedObject.MoveHandleTo(point, resizedObjectHandle);
                    drawArea.Refresh();
                }
            }

            // move
            if (selectMode == SelectionMode.Move)
            {
                int n = drawArea.TheLayers[al].Graphics.SelectionCount;

                for (int i = 0; i < n; i++)
                {
                    drawArea.TheLayers[al].Graphics.GetSelectedObject(i).Move(dx, dy);
                }

                drawArea.Cursor = Cursors.SizeAll;
                drawArea.Refresh();
            }

            if (selectMode == SelectionMode.NetSelection)
            {
                drawArea.NetRectangle = DrawRectangle.GetNormalizedRectangle(startPoint, lastPoint);
                drawArea.Refresh();
                return;
            }
        }
示例#18
0
        /// <summary>
        /// Left mouse button is pressed
        /// </summary>
        /// <param name="drawArea"></param>
        /// <param name="e"></param>
        public override void OnMouseDown(DrawArea drawArea, MouseEventArgs e)
        {
            commandChangeState = null;
            wasMove            = false;

            selectMode = SelectionMode.None;
            Point point = drawArea.BackTrackMouse(new Point(e.X, e.Y));

            // Test for resizing (only if control is selected, cursor is on the handle)
            int al = drawArea.TheLayers.ActiveLayerIndex;
            int n  = drawArea.TheLayers[al].Graphics.SelectionCount;

            for (int i = 0; i < n; i++)
            {
                DrawObject o            = drawArea.TheLayers[al].Graphics.GetSelectedObject(i);
                int        handleNumber = o.HitTest(point);

                if (handleNumber > 0)
                {
                    selectMode = SelectionMode.Size;
                    // keep resized object in class members
                    resizedObject       = o;
                    resizedObjectHandle = handleNumber;
                    // Since we want to resize only one object, unselect all other objects
                    drawArea.TheLayers[al].Graphics.UnselectAll();
                    o.Selected         = true;
                    commandChangeState = new CommandChangeState(drawArea.TheLayers);
                    break;
                }
            }

            // Test for move (cursor is on the object)
            if (selectMode == SelectionMode.None)
            {
                int        n1 = drawArea.TheLayers[al].Graphics.Count;
                DrawObject o  = null;

                for (int i = 0; i < n1; i++)
                {
                    if (drawArea.TheLayers[al].Graphics[i].HitTest(point) == 0)
                    {
                        o = drawArea.TheLayers[al].Graphics[i];
                        break;
                    }
                }

                if (o != null)
                {
                    selectMode = SelectionMode.Move;

                    // Unselect all if Ctrl is not pressed and clicked object is not selected yet
                    if ((Control.ModifierKeys & Keys.Control) == 0 && !o.Selected)
                    {
                        drawArea.TheLayers[al].Graphics.UnselectAll();
                    }

                    // Select clicked object
                    o.Selected         = true;
                    commandChangeState = new CommandChangeState(drawArea.TheLayers);

                    drawArea.Cursor = Cursors.SizeAll;
                }
            }

            // Net selection
            if (selectMode == SelectionMode.None)
            {
                // click on background
                if ((Control.ModifierKeys & Keys.Control) == 0)
                {
                    drawArea.TheLayers[al].Graphics.UnselectAll();
                }

                selectMode = SelectionMode.NetSelection;
                drawArea.DrawNetRectangle = true;
            }

            lastPoint.X  = point.X;
            lastPoint.Y  = point.Y;
            startPoint.X = point.X;
            startPoint.Y = point.Y;

            drawArea.Capture      = true;
            drawArea.NetRectangle = DrawRectangle.GetNormalizedRectangle(startPoint, lastPoint);
            drawArea.Refresh();
        }
示例#19
0
		public override void OnMouseDown(DrawArea drawArea, MouseEventArgs e)
		{
			Point p = drawArea.BackTrackMouse(new Point(e.X, e.Y));
			AddNewObject(drawArea, new DrawImage(p.X, p.Y));
		}
示例#20
0
		/// <summary>
		/// Mouse is moved.
		/// None button is pressed, ot left button is pressed.
		/// </summary>
		/// <param name="drawArea"></param>
		/// <param name="e"></param>
		public override void OnMouseMove(DrawArea drawArea, MouseEventArgs e)
		{
			Point point = drawArea.BackTrackMouse(new Point(e.X, e.Y));
			int al = drawArea.TheLayers.ActiveLayerIndex;
			wasMove = true;

			// set cursor when mouse button is not pressed
			if (e.Button == MouseButtons.None)
			{
				Cursor cursor = null;

				if (drawArea.TheLayers[al].Graphics != null)
				{
					for (int i = 0; i < drawArea.TheLayers[al].Graphics.Count; i++)
					{
						int n = drawArea.TheLayers[al].Graphics[i].HitTest(point);

						if (n > 0)
						{
							cursor = drawArea.TheLayers[al].Graphics[i].GetHandleCursor(n);
							break;
						}
					}
				}

				if (cursor == null)
					cursor = Cursors.Default;

				drawArea.Cursor = cursor;
				return;
			}

			if (e.Button != MouseButtons.Left)
				return;

			/// Left button is pressed

			// Find difference between previous and current position
			int dx = point.X - lastPoint.X;
			int dy = point.Y - lastPoint.Y;

			lastPoint.X = point.X;
			lastPoint.Y = point.Y;

			// resize
			if (selectMode == SelectionMode.Size)
			{
				if (resizedObject != null)
				{
					resizedObject.MoveHandleTo(point, resizedObjectHandle);
					drawArea.Refresh();
				}
			}

			// move
			if (selectMode == SelectionMode.Move)
			{
				int n = drawArea.TheLayers[al].Graphics.SelectionCount;

				for (int i = 0; i < n; i++)
				{
					drawArea.TheLayers[al].Graphics.GetSelectedObject(i).Move(dx, dy);
				}

				drawArea.Cursor = Cursors.SizeAll;
				drawArea.Refresh();
			}

			if (selectMode == SelectionMode.NetSelection)
			{
				drawArea.NetRectangle = DrawRectangle.GetNormalizedRectangle(startPoint, lastPoint);
				drawArea.Refresh();
				return;
			}

		}
示例#21
0
		/// <summary>
		/// Right mouse button is released
		/// </summary>
		/// <param name="drawArea"></param>
		/// <param name="e"></param>
		public override void OnMouseUp(DrawArea drawArea, MouseEventArgs e)
		{
			int al = drawArea.TheLayers.ActiveLayerIndex;
			if (selectMode == SelectionMode.NetSelection)
			{
				// Group selection
				drawArea.TheLayers[al].Graphics.SelectInRectangle(drawArea.NetRectangle);

				selectMode = SelectionMode.None;
				drawArea.DrawNetRectangle = false;
			}

			if (resizedObject != null)
			{
				// after resizing
				resizedObject.Normalize();
				resizedObject = null;
			}

			drawArea.Capture = false;
			drawArea.Refresh();

			if (commandChangeState != null && wasMove)
			{
				// Keep state after moving/resizing and add command to history
				commandChangeState.NewState(drawArea.TheLayers);
				drawArea.AddCommandToHistory(commandChangeState);
				commandChangeState = null;
			}
			lastPoint = drawArea.BackTrackMouse(e.Location);
		}
示例#22
0
		/// <summary>
		/// Left mouse button is pressed
		/// </summary>
		/// <param name="drawArea"></param>
		/// <param name="e"></param>
		public override void OnMouseDown(DrawArea drawArea, MouseEventArgs e)
		{
			commandChangeState = null;
			wasMove = false;

			selectMode = SelectionMode.None;
			Point point = drawArea.BackTrackMouse(new Point(e.X, e.Y));

			// Test for resizing (only if control is selected, cursor is on the handle)
			int al = drawArea.TheLayers.ActiveLayerIndex;
			int n = drawArea.TheLayers[al].Graphics.SelectionCount;

			for (int i = 0; i < n; i++)
			{
				DrawObject o = drawArea.TheLayers[al].Graphics.GetSelectedObject(i);
				int handleNumber = o.HitTest(point);

				if (handleNumber > 0)
				{
					selectMode = SelectionMode.Size;
					// keep resized object in class members
					resizedObject = o;
					resizedObjectHandle = handleNumber;
					// Since we want to resize only one object, unselect all other objects
					drawArea.TheLayers[al].Graphics.UnselectAll();
					o.Selected = true;
					commandChangeState = new CommandChangeState(drawArea.TheLayers);
					break;
				}
			}

			// Test for move (cursor is on the object)
			if (selectMode == SelectionMode.None)
			{
				int n1 = drawArea.TheLayers[al].Graphics.Count;
				DrawObject o = null;

				for (int i = 0; i < n1; i++)
				{
					if (drawArea.TheLayers[al].Graphics[i].HitTest(point) == 0)
					{
						o = drawArea.TheLayers[al].Graphics[i];
						break;
					}
				}

				if (o != null)
				{
					selectMode = SelectionMode.Move;

					// Unselect all if Ctrl is not pressed and clicked object is not selected yet
					if ((Control.ModifierKeys & Keys.Control) == 0 && !o.Selected)
						drawArea.TheLayers[al].Graphics.UnselectAll();

					// Select clicked object
					o.Selected = true;
					commandChangeState = new CommandChangeState(drawArea.TheLayers);

					drawArea.Cursor = Cursors.SizeAll;
				}
			}

			// Net selection
			if (selectMode == SelectionMode.None)
			{
				// click on background
				if ((Control.ModifierKeys & Keys.Control) == 0)
					drawArea.TheLayers[al].Graphics.UnselectAll();

				selectMode = SelectionMode.NetSelection;
				drawArea.DrawNetRectangle = true;
			}

			lastPoint.X = point.X;
			lastPoint.Y = point.Y;
			startPoint.X = point.X;
			startPoint.Y = point.Y;

			drawArea.Capture = true;
			drawArea.NetRectangle = DrawRectangle.GetNormalizedRectangle(startPoint, lastPoint);
			drawArea.Refresh();
		}
示例#23
0
        public override void OnMouseDown(DrawArea drawArea, MouseEventArgs e)
        {
            Point p = drawArea.BackTrackMouse(new Point(e.X, e.Y));

            AddNewObject(drawArea, new DrawImage(p.X, p.Y));
        }