edgar-mtz-e / slimdx

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

Surface.ToStream(Surface, ImageFileFormat, Rectangle) passes invalid rectangle to DirectX #441

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Version: November 2008

Surface.ToStream casts Drawing.Rectangle to windows tagRECT, but these use 
different internal representations. tagRECT stores left, top, right, 
bottom, while Drawing.Rectangle stores left, top, width, height. 

This causes ToStream to malfunction when left or top are different from 0.

The same thing may likely be done in other functions of SlimDX which use 
rectangles.

Original issue reported on code.google.com by lec...@gmail.com on 24 Feb 2009 at 7:23

GoogleCodeExporter commented 9 years ago
Looks like several methods of the Surface class handle this incorrectly, 
although it
appears to be isolated to that one class.

Original comment by Mike.Popoloski on 24 Feb 2009 at 7:44

GoogleCodeExporter commented 9 years ago
Fixed in r914.

Original comment by Mike.Popoloski on 25 Feb 2009 at 7:12