Tweaked the docs a bit more
This commit is contained in:
Родитель
405286e40f
Коммит
e85d7d1680
|
@ -37,20 +37,21 @@
|
|||
// Configure our brush
|
||||
var redBrush = new SKPaint () {
|
||||
Color = new SKColor (0xff, 0, 0),
|
||||
IsStroke = true
|
||||
IsStroke = true
|
||||
};
|
||||
var blueBrush = new SKPaint () {
|
||||
Color = new SKColor (0, 0, 0xff),
|
||||
IsStroke = true
|
||||
IsStroke = true
|
||||
};
|
||||
|
||||
for (int i = 0; i < 64; i += 8)
|
||||
canvas.DrawRect (new SKRect (i, i, 256-i, 256-i), (i % 16 == 0) ? redBrush : blueBrush);
|
||||
|
||||
// Save the artwork
|
||||
using (var output = File.OpenWrite ("demo.png"))
|
||||
{
|
||||
surface.Snapshot().Encode().SaveTo(output);
|
||||
using (var image = surface.Snapshot ())
|
||||
using (var data = image.Encode ())
|
||||
using (var output = File.OpenWrite ("demo.png")) {
|
||||
data.SaveTo(output);
|
||||
}
|
||||
}
|
||||
]]></code>
|
||||
|
|
Загрузка…
Ссылка в новой задаче