文字列ポリゴン-補足-


そういえば回してなかったが行列いれるだけ

drawPath.AddString("テスト", font, 0, 12f, pt, null);
Matrix matrix = new Matrix();
matrix.Rotate(45f); // 回転する
drawPath.Transform(matrix);

大きさ変更や移動も当然可能なので位置合わせもこれがあれば可能か
http://msdn.microsoft.com/ja-jp/library/system.drawing.drawing2d.matrix(v=vs.110).aspx

PointFの座標変換とか考えると結構楽か。

出来るWKTを表示するクエリ

DECLARE @geom GEOMETRY
SET @geom = GEOMETRY::STGeomFromText ('Polygon((5.713478 -12.33432,-1.04823 -5.572608,-0.4723251 -4.996703,6.289383 -11.75841,5.713478 -12.33432),(0.4226065 -12.1313,-0.2734513 -12.82736,-0.9563904 -13.27966,-1.626207 -13.4882,-2.296026 -13.69674,-3.032135 -13.70503,-3.834535 -13.51306,-4.636935 -13.32109,-5.503556 -12.91713,-6.434395 -12.30117,-6.073936 -11.49325,-5.021564 -12.17549,-4.027884 -12.55736,-3.092901 -12.63884,-2.157918 -12.72032,-1.284393 -12.35503,-0.4723253 -11.54296,-0.04143238 -11.11207,-3.799318 -7.354186,-3.19441 -6.749278,4.561667 -14.50535,3.956759 -15.11026,0.700201 -11.8537,0.4226065 -12.1313),(9.479649 -27.33685,8.435561 -27.20427,8.457658 -25.66852,8.365126 -23.69222,8.157969 -21.27535,5.464884 -21.22287,3.168168 -20.78783,1.26782 -19.97024,1.479123 -19.12917,3.081161 -19.80313,4.949746 -20.20088,7.084878 -20.32241,9.220008 -20.44394,11.11069 -20.13458,12.75692 -19.39433,8.029528 -14.66694,8.605433 -14.09103,14.0786 -19.56421,14.09518 -19.88737,12.53733 -20.67182,10.84829 -21.12067,9.028041 -21.23392,9.213104 -22.73928,9.363639 -24.77359,9.479649 -27.33685,9.479649 -27.33685),(20.52543 -33.36107,19.51449 -33.50194,19.3239 -32.54348,19.01454 -31.48005,18.58641 -30.31167,18.15828 -29.14329,17.726 -28.15306,17.28959 -27.341,12.89365 -31.73694,12.15616 -30.99945,19.41091 -23.7447,20.15668 -24.49047,17.93593 -26.71123,19.08221 -28.84084,19.94538 -31.05745,20.52543 -33.36107,20.52543 -33.36107))',0);

SELECT @geom;
カテゴリー: 開発 タグ: , パーマリンク