JingboYang / slimdx

Automatically exported from code.google.com/p/slimdx
MIT License
0 stars 0 forks source link

RectangleGeometry(System.Drawing.RectangleF) interprets rectangle values incorrectly #813

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
June 2010 SlimDX SDK. .NET 2.0 x86

The SlimDX.RectangleGeometry constructor is interpreting the 
System.Drawing.RectangleF parameter as left,top,right,bottom when it should be 
left,top,width,height.

To reproduce:

System.Drawing.RectangleF rRectangle = new System.Drawing.RectangleF(100.0f, 
350.0f, 100.0f, 20.0f);
SlimDX.Direct2D.RectangleGeometry gRectangle = new 
SlimDX.Direct2D.RectangleGeometry(GeometryFactory, rRectangle);
rRectangle = gRectangle.Rectangle;

The resulting rRectangle will be

.Top = 100.0f
.Left = 350.0f
.Width = 0.0f
.Height = -330.0f

when it should be

.Top = 100.0f
.Left = 350.0f
.Width = 100.0f
.Height = 20.0f

Drawing goes by the left,top,right,bottom interpretation as well.

Original issue reported on code.google.com by John.M.B...@gmail.com on 14 Jul 2011 at 12:46

GoogleCodeExporter commented 9 years ago
Duplicated in March 2011 SlimDX SDK.  .NET 2.0 x86.

Original comment by John.M.B...@gmail.com on 14 Jul 2011 at 5:34

GoogleCodeExporter commented 9 years ago

Original comment by Mike.Popoloski on 15 Jul 2011 at 2:50

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r2112.

Original comment by Mike.Popoloski on 17 Jul 2011 at 5:38