我正在C#中創建一個Rect,並帶有兩個點。這些點實際上是地理邊界。我遇到的問題是當我創建矩形時y軸被翻轉。C#Rect類y軸未正確創建
例如說我的數據是west="5.42194487004" south="46.407494" east="17.166386" north="55.056664"
我傳遞到Rect geoBounds = new Rect(new Point(west, north),new Point(east, south));
所創建的矩形具有以下性質
Bottom 55.056664 double
Height 7.781945 double
IsEmpty false bool
Left 5.864166 double
Right 15.038887000000003 double
Top 47.274719 double
Width 9.1747210000000017 double
X 5.864166 double
Y 47.274719 double
Y軸被翻轉。我已經三重檢查了正在輸入呼叫的數據是否正確。哪裏不對?另外我知道我沒有提供太多的代碼,但不再需要更多的代碼。如果需要,將提供更多。
您使用哪個Point和Rect(在哪個命名空間中)? – Alan
'System.Windows.Rect'和'System.Windows.Point' – Dan