Esempio n. 1
0
 public void DrawRect(GDIPen pen, int left, int top, int width, int height)
 {
     this.DrawLine(pen, new Point(left, top), new Point(left + width, top));
     this.DrawLine(pen, new Point(left, top + height), new Point(left + width, top + height));
     this.DrawLine(pen, new Point(left, top), new Point(left, top + height));
     this.DrawLine(pen, new Point(left + width, top), new Point(left + width, top + height + 1));
 }
Esempio n. 2
0
        public void DrawLine(Color color, Point p1, Point p2)
        {
            GDIPen p = new GDIPen(color, 1);

            DrawLine(p, p1, p2);
            p.Dispose();
        }
Esempio n. 3
0
        public void DrawRect(Color color, int left, int top, int width, int height)
        {
            GDIPen p = new GDIPen(color, 1);

            this.DrawRect(p, left, top, width, height);
            p.Dispose();
        }
Esempio n. 4
0
        public void DrawLine(GDIPen pen, Point p1, Point p2)
        {
            IntPtr   oldpen = NativeGdi32Api.SelectObject(mhDC, pen.hPen);
            POINTAPI gp;

            gp.X = 0;
            gp.Y = 0;
            NativeGdi32Api.MoveToEx(mhDC, p1.X, p1.Y, ref gp);
            NativeGdi32Api.LineTo(mhDC, p2.X, p2.Y);
            IntPtr crap = NativeGdi32Api.SelectObject(mhDC, oldpen);
        }
Esempio n. 5
0
		public void DrawRect(GDIPen pen, int left, int top, int width, int height)
		{
			this.DrawLine(pen, new Point(left, top), new Point(left + width, top));
			this.DrawLine(pen, new Point(left, top + height), new Point(left + width, top + height));
			this.DrawLine(pen, new Point(left, top), new Point(left, top + height));
			this.DrawLine(pen, new Point(left + width, top), new Point(left + width, top + height + 1));
		}
Esempio n. 6
0
		public void DrawRect(Color color, int left, int top, int width, int height)
		{
			GDIPen p = new GDIPen(color, 1);
			this.DrawRect(p, left, top, width, height);
			p.Dispose();
		}
Esempio n. 7
0
		public void DrawLine(Color color, Point p1, Point p2)
		{
			GDIPen p = new GDIPen(color, 1);
			DrawLine(p, p1, p2);
			p.Dispose();
		}
Esempio n. 8
0
		public void DrawLine(GDIPen pen, Point p1, Point p2)
		{
            IntPtr oldpen = NativeGdi32Api.SelectObject(mhDC, pen.hPen);
			POINTAPI gp;
			gp.X = 0;
			gp.Y = 0;
            NativeGdi32Api.MoveToEx(mhDC, p1.X, p1.Y, ref gp);
            NativeGdi32Api.LineTo(mhDC, p2.X, p2.Y);
            IntPtr crap = NativeGdi32Api.SelectObject(mhDC, oldpen);
		}