窗口或者控件的默认坐标原点是左上角(x轴向右为正,y轴向下为正)
我现在想实现坐标原点放到左下角((x轴向右为正,y轴向上为正),
在这个坐标的基础上在Form上画一个圆,如何实现?谢谢!另外什么是 world coodinate(世界坐标),page coodinate(页面坐标),device coodinate(设备坐标),page coodinate是不是就是指的form(或者panel)上的坐标系统
我现在想实现坐标原点放到左下角((x轴向右为正,y轴向上为正),
在这个坐标的基础上在Form上画一个圆,如何实现?谢谢!另外什么是 world coodinate(世界坐标),page coodinate(页面坐标),device coodinate(设备坐标),page coodinate是不是就是指的form(或者panel)上的坐标系统
解决方案 »
- 指纹识别系统的问题
- 请问如何将数据库中的图片读取出来并显示到页面上呢?????
- 高手进!!访问IHTMLAnchorElement的属性时,出错:尝试读取或修改受保护的内存
- 一个解决方案中添加2个windos应用程序,如何相互启动?
- 查询处理器未能用优化程序生成查询计划,因为查询无法同时更新聚集键和 text、ntext 或 image 列。
- 急:vs.net 2005 有对应的 tabtrip和MultiPage 控件么?
- 一个方法怎么也找不到,十万火急。。。多谢帮忙。。。。
- toolstrip中的button的image不对劲
- 重装了一下IIS为何.NET不能用了?
- MSXML2.DOMDocument 的问题
- c#小票打印?
- 求助!!!
Graphics g = this.CreateGraphics();
PointF Pcenter=new PointF( this.ClientSize.Width/2,
this.ClientSize.Height/2);
g.TranslateTransform( Pcenter.X, Pcenter.Y );
g.RotateTransform( -90 );//Top-left point translate to bottom-left point
g.TranslateTransform( -Pcenter.X, -Pcenter.Y );
g.DrawRectangle( new Pen( Color.Red ), 20,20, 100,100 );//Draw image here
g.ResetTransform();
请问如何在form上把这两点之间的线段画出来
Matrix myMatrix = new Matrix(1, 0, 0, -1, 0, 0);
e.Graphics.Transform = myMatrix;
e.Graphics.TranslateTransform( 0,300, System.Drawing.Drawing2D.MatrixOrder.Append );
GraphicsPath myGraphicsPath = new GraphicsPath();
Rectangle myRectangle = new Rectangle(0, 0, 60, 60);
Rectangle rect1 = new Rectangle( 0,0 ,30 , 200);
GraphicsPath gp2 = new GraphicsPath();
gp2.AddRectangle( rect1 );
myGraphicsPath.AddRectangle(myRectangle);
System.Drawing.Brush mySolidBrush1 = System.Drawing.Brushes.Red ;
e.Graphics.FillPath( mySolidBrush1, myGraphicsPath);
e.Graphics.FillPath( Brushes.Blue , gp2 );
Matrix myMatrix = new Matrix(1, 0, 0, -1, 0, 0);
e.Graphics.Transform = myMatrix;
e.Graphics.TranslateTransform( 0,300, System.Drawing.Drawing2D.MatrixOrder.Append );这个是可以转换坐标,但是绘制处理的字符串怎么倒过来了,有那位朋友知道怎么解决?
{
base.OnPaint(e);
Graphics g = e.Graphics;
g.PageScale = 25.4f / 96;
g.PageUnit = GraphicsUnit.Millimeter;
Matrix matrix = new Matrix(1, 0, 0, -1, 0, 0);
g.Transform = matrix;
g.TranslateTransform(0, this.Height, System.Drawing.Drawing2D.MatrixOrder.Append);
g.DrawLine(Pens.Red, 0, 0, 100, 100);
g.DrawString("ABCDEFG", new Font("Verdana", 20, FontStyle.Bold, GraphicsUnit.Pixel), Brushes.White, 0, 0); }
protected override void OnMouseDown(MouseEventArgs e)
{
base.OnMouseDown(e);
MessageBox.Show(e.X.ToString() + "--" + e.Y.ToString());
}对话框显示的还是以左上角为原点的坐标系,和我想象的不一样! 着急!