using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace 坐标变换
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)//平移变换
{
Rectangle r = new Rectangle(new Point(0,0), new Size(80, 80));//定义一个长方形,原点是(0,0),宽80高80
SolidBrush b = new SolidBrush(Color.Red);
Graphics g = this.CreateGraphics();
g.FillRectangle(b, r);
g.TranslateTransform(100f, 100f);//原点平移
C# 坐标转换
最新推荐文章于 2024-02-04 12:11:21 发布
本文详细介绍了如何使用C#进行地理坐标(经纬度)与平面坐标之间的转换,包括WGS84到UTM的转换,以及在GIS应用中的常见坐标变换算法。通过实例代码,帮助开发者理解并实现坐标系统的转换操作。
摘要由CSDN通过智能技术生成