sharpdx / SharpDX-Samples

Official repository for all SharpDX Samples
346 stars 223 forks source link

SurfaceImageSourceTarget supportOpacity inverted? #2

Closed KarimLUCCIN closed 10 years ago

KarimLUCCIN commented 10 years ago

Hi,

Just wondering about this line: https://github.com/sharpdx/SharpDX-Samples/blob/master/WindowsAppStore81/CommonDX/SurfaceImageSourceTarget.cs#L57 this.surfaceImageSource = new SurfaceImageSource(pixelWidth, pixelHeight, supportOpacity);

But the SurfaceImageSource constructor is defined as this in the doc: http://msdn.microsoft.com/en-us/library/windows/apps/hh702047 public SurfaceImageSource( int pixelWidth, int pixelHeight, bool isOpaque)

Isn't that the inverse of supportOpacity ? I mean, shouldn't the line be this.surfaceImageSource = new SurfaceImageSource(pixelWidth, pixelHeight, !supportOpacity);

Cheers! K

ArtiomCiumac commented 10 years ago

In the commit above I just renamed the parameter from supportOpacity to isOpaque to reflect its real meaning.

KarimLUCCIN commented 10 years ago

Cool thank you :)