зеркало из https://github.com/mono/SkiaSharp.git
Updated some samples
This commit is contained in:
Родитель
4aa15d81e1
Коммит
d9c426236f
|
@ -21,7 +21,7 @@ namespace SkiaSharpSample.Samples
|
|||
// load the image from the embedded resource stream
|
||||
using (var stream = new SKManagedStream(SampleMedia.Images.Baboon))
|
||||
using (var bitmap = SKBitmap.Decode(stream))
|
||||
using (var cf = SKColorFilter.CreateXferMode(SKColors.Red, SKXferMode.ColorDodge))
|
||||
using (var cf = SKColorFilter.CreateBlendMode(SKColors.Red, SKBlendMode.ColorDodge))
|
||||
using (var paint = new SKPaint())
|
||||
{
|
||||
paint.ColorFilter = cf;
|
||||
|
|
|
@ -19,7 +19,7 @@ namespace SkiaSharpSample.Samples
|
|||
|
||||
protected override void OnDrawSample(SKCanvas canvas, int width, int height)
|
||||
{
|
||||
var modes = Enum.GetValues(typeof(SKXferMode)).Cast<SKXferMode>().ToArray();
|
||||
var modes = Enum.GetValues(typeof(SKBlendMode)).Cast<SKBlendMode>().ToArray();
|
||||
|
||||
var cols = width < height ? 3 : 5;
|
||||
var rows = (modes.Length - 1) / cols + 1;
|
||||
|
@ -73,7 +73,7 @@ namespace SkiaSharpSample.Samples
|
|||
canvas.Clear(SKColors.Transparent);
|
||||
canvas.DrawPaint(dst);
|
||||
|
||||
src.XferMode = modes[i];
|
||||
src.BlendMode = modes[i];
|
||||
canvas.DrawPaint(src);
|
||||
canvas.DrawRect(rect, stroke);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче