Browse Source

[SKIA] Fixed DrawImage opacity

repro/dynamic-resource-bug
Nikita Tsukanov 9 years ago
parent
commit
c7262e76d2
  1. 2
      src/Skia/Avalonia.Skia/DrawingContextImpl.cs

2
src/Skia/Avalonia.Skia/DrawingContextImpl.cs

@ -45,7 +45,7 @@ namespace Avalonia.Skia
var s = sourceRect.ToSKRect(); var s = sourceRect.ToSKRect();
var d = destRect.ToSKRect(); var d = destRect.ToSKRect();
using (var paint = new SKPaint() using (var paint = new SKPaint()
{ Color = new SKColor(255, 255, 255, (byte)(255 * opacity)) }) { Color = new SKColor(255, 255, 255, (byte)(255 * opacity * _currentOpacity)) })
{ {
Canvas.DrawBitmap(impl.Bitmap, s, d, paint); Canvas.DrawBitmap(impl.Bitmap, s, d, paint);
} }

Loading…
Cancel
Save