Point.Offset 方法 (Int32, Int32) &&Point.Offset 方法 (Point)
来源:互联网 发布:还珠格格知画扮演者 编辑:程序博客网 时间:2024/05/23 21:29
1.Point.Offset 方法 (Int32, Int32)
将此 Point 平移指定的量。
命名空间: System.Drawing
程序集: System.Drawing(在 System.Drawing.dll 中)
语法
public void Offset(int dx,int dy)
- dx
- 类型:System..::.Int32
偏移 X 坐标的量。
- dy
- 类型:System..::.Int32
偏移 Y 坐标的量。
平台
Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98, Windows CE, Windows Mobile for Smartphone, Windows Mobile for Pocket PC
.NET Framework 和 .NET Compact Framework 并不是对每个平台的所有版本都提供支持。有关支持的版本的列表,请参见.NET Framework 系统要求。
版本信息
.NET Framework
受以下版本支持:3.5、3.0 SP1、3.0、2.0 SP1、2.0、1.1、1.0.NET Compact Framework
受以下版本支持:3.5、2.0、1.0请参见
参考
将此 Point 平移指定的 Point。
命名空间: System.Drawing
程序集: System.Drawing(在 System.Drawing.dll 中)
语法
public void Offset(Point p)
参数
- p
- 类型:System.Drawing.Point
用于使此 Point 发生偏移的 Point。
备注
此方法将此 Point 的 X 和Y 值分别调整为此 Point 的 X 和 Y 值与 p 之和。
示例
下面的示例显示如何使用 Offset 方法。若要运行此示例,请将其粘贴到 Windows 窗体中。处理窗体的 Paint 事件并从 Paint 事件处理方法中调用OffsetPoint 方法,同时将 e 作为 PaintEventArgs 传递。
private void OffsetPoint(PaintEventArgs e){ Point point1 = new Point(10, 10); point1.Offset(50, 0); Point point2 = new Point(250, 10); e.Graphics.DrawLine(Pens.Red, point1, point2);}
平台
Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98
.NET Framework 和 .NET Compact Framework 并不是对每个平台的所有版本都提供支持。有关支持的版本的列表,请参见.NET Framework 系统要求。
版本信息
.NET Framework
受以下版本支持:3.5、3.0 SP1、3.0、2.0 SP1、2.0请参见
参考
- Point.Offset 方法 (Int32, Int32) &&Point.Offset 方法 (Point)
- Point
- Point
- point
- Point
- point
- Point
- String.Substring 方法 (Int32, Int32)
- point坐标换算方法
- GraphicsPath.AddArc 方法 (Int32, Int32, Int32, Int32, Single, Single)
- 在Share Point 2010中,如何使用 in 语句?并且解决Boolean Contains[Int32](System.Collections.Generic.IEnumerable`1[System.Int32], Int32)的问题。
- Point中的三个静态方法
- display中getSize(Point)方法
- Stream::Read 方法 (array<Byte>^, Int32, Int32)
- Stream::Read 方法 (array<Byte>^, Int32, Int32)
- offset()方法
- Point to Point Communication
- zero point pole point
- 希腊人11
- uva 10549 Russian Dolls (DP)
- 传说中的数据结构
- PL/SQL(二):控制结构
- CodeSmith 使用教程(17) Merge策略
- Point.Offset 方法 (Int32, Int32) &&Point.Offset 方法 (Point)
- MFC 动态曲线 支持缩放 显示图例(CStatic派生类) .
- 用Properties补充hibernate.cfg.xml配置
- 进制转换
- 好友圈
- Bourbaki集合论(1)译者序与作者简介
- MFC 动态曲线 支持缩放 显示图例(CStatic派生类)(续) .
- 将Linux下的Android签名对pk8和pem转换为Eclipse下的签名(keystore)
- javascript根据字符串创建Date对象,在ios和android中行为不一致