зеркало из https://github.com/mono/SkiaSharp.git
Testing PR Builder (#616)
* Improved the groovy script a good bit * Updated some docs
This commit is contained in:
Родитель
9025fddd35
Коммит
e7a0fbdc20
|
@ -2,9 +2,7 @@
|
||||||
#addin nuget:?package=Cake.XCode&version=4.0.0
|
#addin nuget:?package=Cake.XCode&version=4.0.0
|
||||||
#addin nuget:?package=Cake.FileHelpers&version=3.0.0
|
#addin nuget:?package=Cake.FileHelpers&version=3.0.0
|
||||||
#addin nuget:?package=SharpCompress&version=0.22.0
|
#addin nuget:?package=SharpCompress&version=0.22.0
|
||||||
#addin nuget:?package=Newtonsoft.Json&version=11.0.2
|
#addin nuget:?package=Mono.ApiTools.NuGetDiff&version=1.0.0&loaddependencies=true
|
||||||
#addin nuget:https://ci.appveyor.com/nuget/cake-monoapitools-gunq9ba46ljl?package=Cake.MonoApiTools&version=2.0.0-preview2
|
|
||||||
#addin nuget:https://ci.appveyor.com/nuget/nugetcomparer-mmjynpq6dcr9?package=Mono.ApiTools.NuGetDiff&version=1.0.0-preview-20&loaddependencies=true
|
|
||||||
|
|
||||||
#tool "nuget:?package=xunit.runner.console&version=2.4.0"
|
#tool "nuget:?package=xunit.runner.console&version=2.4.0"
|
||||||
#tool "nuget:?package=mdoc&version=5.7.2.3"
|
#tool "nuget:?package=mdoc&version=5.7.2.3"
|
||||||
|
@ -18,8 +16,6 @@ using System.Xml;
|
||||||
using System.Xml.Linq;
|
using System.Xml.Linq;
|
||||||
using SharpCompress.Common;
|
using SharpCompress.Common;
|
||||||
using SharpCompress.Readers;
|
using SharpCompress.Readers;
|
||||||
using Newtonsoft.Json;
|
|
||||||
using Newtonsoft.Json.Linq;
|
|
||||||
using Mono.ApiTools;
|
using Mono.ApiTools;
|
||||||
using NuGet.Packaging;
|
using NuGet.Packaging;
|
||||||
using NuGet.Versioning;
|
using NuGet.Versioning;
|
||||||
|
|
|
@ -149,10 +149,19 @@
|
||||||
<param name="e">The event arguments that contain the drawing surface and information.</param>
|
<param name="e">The event arguments that contain the drawing surface and information.</param>
|
||||||
<summary>Implement this to draw on the canvas.</summary>
|
<summary>Implement this to draw on the canvas.</summary>
|
||||||
<remarks>
|
<remarks>
|
||||||
<para>There are two ways to draw on this surface: by overriding the <see cref="M:SkiaSharp.Views.Desktop.SKControl.OnPaintSurface(SkiaSharp.Views.Desktop.SKPaintSurfaceEventArgs)" /> method, or by attaching a handler to the <see cref="E:SkiaSharp.Views.Desktop.SKControl.PaintSurface" /> event. If the method is overridden, then the base must be called.</para>
|
<format type="text/markdown"><![CDATA[
|
||||||
<para></para>
|
## Remarks
|
||||||
<example>
|
|
||||||
<code lang="C#"><![CDATA[protected override void OnPaintSurface (SKPaintSurfaceEventArgs e)
|
There are two ways to draw on this surface: by overriding the
|
||||||
|
<xref:SkiaSharp.Views.Desktop.SKControl.OnPaintSurface(SkiaSharp.Views.Desktop.SKPaintSurfaceEventArgs)>
|
||||||
|
method, or by attaching a handler to the
|
||||||
|
<xref:SkiaSharp.Views.Desktop.SKControl.PaintSurface>
|
||||||
|
event. If the method is overridden, then the base must be called.
|
||||||
|
|
||||||
|
## Examples
|
||||||
|
|
||||||
|
```csharp
|
||||||
|
protected override void OnPaintSurface (SKPaintSurfaceEventArgs e)
|
||||||
{
|
{
|
||||||
// call the base method
|
// call the base method
|
||||||
base.OnPaintSurface (e);
|
base.OnPaintSurface (e);
|
||||||
|
@ -165,8 +174,9 @@
|
||||||
|
|
||||||
// draw on the canvas
|
// draw on the canvas
|
||||||
canvas.Flush ();
|
canvas.Flush ();
|
||||||
}]]></code>
|
}
|
||||||
</example>
|
```
|
||||||
|
]]></format>
|
||||||
</remarks>
|
</remarks>
|
||||||
</Docs>
|
</Docs>
|
||||||
</Member>
|
</Member>
|
||||||
|
@ -193,10 +203,19 @@
|
||||||
<Docs>
|
<Docs>
|
||||||
<summary>Occurs when the the canvas needs to be redrawn.</summary>
|
<summary>Occurs when the the canvas needs to be redrawn.</summary>
|
||||||
<remarks>
|
<remarks>
|
||||||
<para>There are two ways to draw on this surface: by overriding the <see cref="M:SkiaSharp.Views.Desktop.SKControl.OnPaintSurface(SkiaSharp.Views.Desktop.SKPaintSurfaceEventArgs)" /> method, or by attaching a handler to the <see cref="E:SkiaSharp.Views.Desktop.SKControl.PaintSurface" /> event.</para>
|
<format type="text/markdown"><![CDATA[
|
||||||
<para></para>
|
## Remarks
|
||||||
<example>
|
|
||||||
<code lang="C#"><![CDATA[SKControl myView = ...;
|
There are two ways to draw on this surface: by overriding the
|
||||||
|
<xref:SkiaSharp.Views.Desktop.SKControl.OnPaintSurface(SkiaSharp.Views.Desktop.SKPaintSurfaceEventArgs)>
|
||||||
|
method, or by attaching a handler to the
|
||||||
|
<xref:SkiaSharp.Views.Desktop.SKControl.PaintSurface>
|
||||||
|
event.
|
||||||
|
|
||||||
|
## Examples
|
||||||
|
|
||||||
|
```csharp
|
||||||
|
SKControl myView = ...;
|
||||||
|
|
||||||
myView.PaintSurface += (sender, e) => {
|
myView.PaintSurface += (sender, e) => {
|
||||||
var surface = e.Surface;
|
var surface = e.Surface;
|
||||||
|
@ -207,8 +226,9 @@ myView.PaintSurface += (sender, e) => {
|
||||||
|
|
||||||
// draw on the canvas
|
// draw on the canvas
|
||||||
canvas.Flush ();
|
canvas.Flush ();
|
||||||
};]]></code>
|
};
|
||||||
</example>
|
```
|
||||||
|
]]></format>
|
||||||
</remarks>
|
</remarks>
|
||||||
</Docs>
|
</Docs>
|
||||||
</Member>
|
</Member>
|
||||||
|
|
|
@ -224,10 +224,19 @@
|
||||||
<param name="e">The event arguments that contain the drawing surface and information.</param>
|
<param name="e">The event arguments that contain the drawing surface and information.</param>
|
||||||
<summary>Implement this to draw on the canvas.</summary>
|
<summary>Implement this to draw on the canvas.</summary>
|
||||||
<remarks>
|
<remarks>
|
||||||
<para>There are two ways to draw on this surface: by overriding the <see cref="M:SkiaSharp.Views.Desktop.SKGLControl.OnPaintSurface(SkiaSharp.Views.Desktop.SKPaintGLSurfaceEventArgs)" /> method, or by attaching a handler to the <see cref="E:SkiaSharp.Views.Desktop.SKGLControl.PaintSurface" /> event. If the method is overridden, then the base must be called.</para>
|
<format type="text/markdown"><![CDATA[
|
||||||
<para></para>
|
## Remarks
|
||||||
<example>
|
|
||||||
<code lang="C#"><![CDATA[protected override void OnPaintSurface (SKPaintGLSurfaceEventArgs e)
|
There are two ways to draw on this surface: by overriding the
|
||||||
|
<xref:SkiaSharp.Views.Desktop.SKGLControl.OnPaintSurface(SkiaSharp.Views.Desktop.SKPaintGLSurfaceEventArgs)>
|
||||||
|
method, or by attaching a handler to the
|
||||||
|
<xref:SkiaSharp.Views.Desktop.SKGLControl.PaintSurface>
|
||||||
|
event. If the method is overridden, then the base must be called.
|
||||||
|
|
||||||
|
## Examples
|
||||||
|
|
||||||
|
```csharp
|
||||||
|
protected override void OnPaintSurface (SKPaintGLSurfaceEventArgs e)
|
||||||
{
|
{
|
||||||
// call the base method
|
// call the base method
|
||||||
base.OnPaintSurface (e);
|
base.OnPaintSurface (e);
|
||||||
|
@ -240,8 +249,9 @@
|
||||||
|
|
||||||
// draw on the canvas
|
// draw on the canvas
|
||||||
canvas.Flush ();
|
canvas.Flush ();
|
||||||
}]]></code>
|
}
|
||||||
</example>
|
```
|
||||||
|
]]></format>
|
||||||
</remarks>
|
</remarks>
|
||||||
</Docs>
|
</Docs>
|
||||||
</Member>
|
</Member>
|
||||||
|
@ -268,10 +278,19 @@
|
||||||
<Docs>
|
<Docs>
|
||||||
<summary>Occurs when the surface needs to be redrawn.</summary>
|
<summary>Occurs when the surface needs to be redrawn.</summary>
|
||||||
<remarks>
|
<remarks>
|
||||||
<para>There are two ways to draw on this surface: by overriding the <see cref="M:SkiaSharp.Views.Desktop.SKGLControl.OnPaintSurface(SkiaSharp.Views.Desktop.SKPaintGLSurfaceEventArgs)" /> method, or by attaching a handler to the <see cref="E:SkiaSharp.Views.Desktop.SKGLControl.PaintSurface" /> event.</para>
|
<format type="text/markdown"><![CDATA[
|
||||||
<para></para>
|
## Remarks
|
||||||
<example>
|
|
||||||
<code lang="C#"><![CDATA[SKGLControl myView = ...;
|
There are two ways to draw on this surface: by overriding the
|
||||||
|
<xref:SkiaSharp.Views.Desktop.SKGLControl.OnPaintSurface(SkiaSharp.Views.Desktop.SKPaintGLSurfaceEventArgs)>
|
||||||
|
method, or by attaching a handler to the
|
||||||
|
<xref:SkiaSharp.Views.Desktop.SKGLControl.PaintSurface>
|
||||||
|
event.
|
||||||
|
|
||||||
|
## Examples
|
||||||
|
|
||||||
|
```csharp
|
||||||
|
SKGLControl myView = ...;
|
||||||
|
|
||||||
myView.PaintSurface += (sender, e) => {
|
myView.PaintSurface += (sender, e) => {
|
||||||
var surface = e.Surface;
|
var surface = e.Surface;
|
||||||
|
@ -282,8 +301,9 @@ myView.PaintSurface += (sender, e) => {
|
||||||
|
|
||||||
// draw on the canvas
|
// draw on the canvas
|
||||||
canvas.Flush ();
|
canvas.Flush ();
|
||||||
};]]></code>
|
};
|
||||||
</example>
|
```
|
||||||
|
]]></format>
|
||||||
</remarks>
|
</remarks>
|
||||||
</Docs>
|
</Docs>
|
||||||
</Member>
|
</Member>
|
||||||
|
|
|
@ -219,10 +219,19 @@
|
||||||
<param name="e">The event arguments that contain the drawing surface and information.</param>
|
<param name="e">The event arguments that contain the drawing surface and information.</param>
|
||||||
<summary>Implement this to draw on the canvas.</summary>
|
<summary>Implement this to draw on the canvas.</summary>
|
||||||
<remarks>
|
<remarks>
|
||||||
<para>There are two ways to draw on this surface: by overriding the <see cref="M:SkiaSharp.Views.Forms.SKCanvasView.OnPaintSurface(SkiaSharp.Views.Forms.SKPaintSurfaceEventArgs)" /> method, or by attaching a handler to the <see cref="E:SkiaSharp.Views.Forms.SKCanvasView.PaintSurface" /> event. If the method is overridden, then the base must be called.</para>
|
<format type="text/markdown"><![CDATA[
|
||||||
<para></para>
|
## Remarks
|
||||||
<example>
|
|
||||||
<code lang="C#"><![CDATA[protected override void OnPaintSurface (SKPaintSurfaceEventArgs e)
|
There are two ways to draw on this surface: by overriding the
|
||||||
|
<xref:SkiaSharp.Views.Forms.SKCanvasView.OnPaintSurface(SkiaSharp.Views.Forms.SKPaintSurfaceEventArgs)>
|
||||||
|
method, or by attaching a handler to the
|
||||||
|
<xref:SkiaSharp.Views.Forms.SKCanvasView.PaintSurface>
|
||||||
|
event. If the method is overridden, then the base must be called.
|
||||||
|
|
||||||
|
## Examples
|
||||||
|
|
||||||
|
```csharp
|
||||||
|
protected override void OnPaintSurface (SKPaintSurfaceEventArgs e)
|
||||||
{
|
{
|
||||||
// call the base method
|
// call the base method
|
||||||
base.OnPaintSurface (e);
|
base.OnPaintSurface (e);
|
||||||
|
@ -235,9 +244,9 @@
|
||||||
|
|
||||||
// draw on the canvas
|
// draw on the canvas
|
||||||
canvas.Flush ();
|
canvas.Flush ();
|
||||||
}]]></code>
|
}
|
||||||
</example>
|
```
|
||||||
<para></para>
|
]]></format>
|
||||||
</remarks>
|
</remarks>
|
||||||
</Docs>
|
</Docs>
|
||||||
</Member>
|
</Member>
|
||||||
|
@ -285,11 +294,19 @@
|
||||||
<Docs>
|
<Docs>
|
||||||
<summary>Occurs when the the canvas needs to be redrawn.</summary>
|
<summary>Occurs when the the canvas needs to be redrawn.</summary>
|
||||||
<remarks>
|
<remarks>
|
||||||
<para>There are two ways to draw on this surface: by overriding the <see cref="M:SkiaSharp.Views.Forms.SKCanvasView.OnPaintSurface(SkiaSharp.Views.Forms.SKPaintSurfaceEventArgs)" /> method, or by attaching a handler to the <see cref="E:SkiaSharp.Views.Forms.SKCanvasView.PaintSurface" /> event.
|
<format type="text/markdown"><![CDATA[
|
||||||
</para>
|
## Remarks
|
||||||
<para></para>
|
|
||||||
<example>
|
There are two ways to draw on this surface: by overriding the
|
||||||
<code lang="C#"><![CDATA[SKCanvasView myView = ...;
|
<xref:SkiaSharp.Views.Forms.SKCanvasView.OnPaintSurface(SkiaSharp.Views.Forms.SKPaintSurfaceEventArgs)>
|
||||||
|
method, or by attaching a handler to the
|
||||||
|
<xref:SkiaSharp.Views.Forms.SKCanvasView.PaintSurface>
|
||||||
|
event.
|
||||||
|
|
||||||
|
## Examples
|
||||||
|
|
||||||
|
```csharp
|
||||||
|
SKCanvasView myView = ...;
|
||||||
|
|
||||||
myView.PaintSurface += (sender, e) => {
|
myView.PaintSurface += (sender, e) => {
|
||||||
var surface = e.Surface;
|
var surface = e.Surface;
|
||||||
|
@ -300,9 +317,9 @@ myView.PaintSurface += (sender, e) => {
|
||||||
|
|
||||||
// draw on the canvas
|
// draw on the canvas
|
||||||
canvas.Flush ();
|
canvas.Flush ();
|
||||||
};]]></code>
|
};
|
||||||
</example>
|
```
|
||||||
<para></para>
|
]]></format>
|
||||||
</remarks>
|
</remarks>
|
||||||
</Docs>
|
</Docs>
|
||||||
</Member>
|
</Member>
|
||||||
|
|
|
@ -234,10 +234,19 @@
|
||||||
<param name="e">The event arguments that contain the drawing surface and information.</param>
|
<param name="e">The event arguments that contain the drawing surface and information.</param>
|
||||||
<summary>Implement this to draw on the surface.</summary>
|
<summary>Implement this to draw on the surface.</summary>
|
||||||
<remarks>
|
<remarks>
|
||||||
<para>There are two ways to draw on this surface: by overriding the <see cref="M:SkiaSharp.Views.Forms.SKGLView.OnPaintSurface(SkiaSharp.Views.Forms.SKPaintGLSurfaceEventArgs)" /> method, or by attaching a handler to the <see cref="E:SkiaSharp.Views.Forms.SKGLView.PaintSurface" /> event. If the method is overridden, then the base must be called.</para>
|
<format type="text/markdown"><![CDATA[
|
||||||
<para></para>
|
## Remarks
|
||||||
<example>
|
|
||||||
<code lang="C#"><![CDATA[protected override void OnPaintSurface (SKPaintGLSurfaceEventArgs e)
|
There are two ways to draw on this surface: by overriding the
|
||||||
|
<xref:SkiaSharp.Views.Forms.SKGLView.OnPaintSurface(SkiaSharp.Views.Forms.SKPaintGLSurfaceEventArgs)>
|
||||||
|
method, or by attaching a handler to the
|
||||||
|
<xref:SkiaSharp.Views.Forms.SKGLView.PaintSurface>
|
||||||
|
event. If the method is overridden, then the base must be called.
|
||||||
|
|
||||||
|
## Examples
|
||||||
|
|
||||||
|
```csharp
|
||||||
|
protected override void OnPaintSurface (SKPaintGLSurfaceEventArgs e)
|
||||||
{
|
{
|
||||||
// call the base method
|
// call the base method
|
||||||
base.OnPaintSurface (e);
|
base.OnPaintSurface (e);
|
||||||
|
@ -250,9 +259,9 @@
|
||||||
|
|
||||||
// draw on the canvas
|
// draw on the canvas
|
||||||
canvas.Flush ();
|
canvas.Flush ();
|
||||||
}]]></code>
|
}
|
||||||
</example>
|
```
|
||||||
<para></para>
|
]]></format>
|
||||||
</remarks>
|
</remarks>
|
||||||
</Docs>
|
</Docs>
|
||||||
</Member>
|
</Member>
|
||||||
|
@ -300,10 +309,19 @@
|
||||||
<Docs>
|
<Docs>
|
||||||
<summary>Occurs when the surface needs to be redrawn.</summary>
|
<summary>Occurs when the surface needs to be redrawn.</summary>
|
||||||
<remarks>
|
<remarks>
|
||||||
<para>There are two ways to draw on this surface: by overriding the <see cref="M:SkiaSharp.Views.Forms.SKGLView.OnPaintSurface(SkiaSharp.Views.Forms.SKPaintGLSurfaceEventArgs)" /> method, or by attaching a handler to the <see cref="E:SkiaSharp.Views.Forms.SKGLView.PaintSurface" /> event.</para>
|
<format type="text/markdown"><![CDATA[
|
||||||
<para></para>
|
## Remarks
|
||||||
<example>
|
|
||||||
<code lang="C#"><![CDATA[SKGLView myView = ...;
|
There are two ways to draw on this surface: by overriding the
|
||||||
|
<xref:SkiaSharp.Views.Forms.SKGLView.OnPaintSurface(SkiaSharp.Views.Forms.SKPaintGLSurfaceEventArgs)>
|
||||||
|
method, or by attaching a handler to the
|
||||||
|
<xref:SkiaSharp.Views.Forms.SKGLView.PaintSurface>
|
||||||
|
event.
|
||||||
|
|
||||||
|
## Examples
|
||||||
|
|
||||||
|
```csharp
|
||||||
|
SKGLView myView = ...;
|
||||||
|
|
||||||
myView.PaintSurface += (sender, e) => {
|
myView.PaintSurface += (sender, e) => {
|
||||||
var surface = e.Surface;
|
var surface = e.Surface;
|
||||||
|
@ -311,12 +329,12 @@ myView.PaintSurface += (sender, e) => {
|
||||||
var surfaceHeight = e.RenderTarget.Height;
|
var surfaceHeight = e.RenderTarget.Height;
|
||||||
|
|
||||||
var canvas = surface.Canvas;
|
var canvas = surface.Canvas;
|
||||||
|
|
||||||
// draw on the canvas
|
// draw on the canvas
|
||||||
canvas.Flush ();
|
canvas.Flush ();
|
||||||
};]]></code>
|
};
|
||||||
</example>
|
```
|
||||||
<para></para>
|
]]></format>
|
||||||
</remarks>
|
</remarks>
|
||||||
</Docs>
|
</Docs>
|
||||||
</Member>
|
</Member>
|
||||||
|
|
|
@ -20,10 +20,19 @@
|
||||||
<Docs>
|
<Docs>
|
||||||
<summary>Convenience class used to restore the canvas state in a using statement.</summary>
|
<summary>Convenience class used to restore the canvas state in a using statement.</summary>
|
||||||
<remarks>
|
<remarks>
|
||||||
<para>This class can be used in a using statement to save the state of the canvas (matrix, clip and draw filter) allowing you to change these components and have them automatically undone by virtue of having the <see cref="M:SkiaSharp.SKAutoCanvasRestore.Dispose" /> method restore the canvas state to the state it was when this instance was created.</para>
|
<format type="text/markdown"><![CDATA[
|
||||||
<para></para>
|
## Remarks
|
||||||
<example>
|
|
||||||
<code lang="C#"><![CDATA[SKCanvas canvas = ...;
|
This class can be used in a using statement to save the state of the canvas
|
||||||
|
(matrix, clip and draw filter) allowing you to change these components and have
|
||||||
|
them automatically undone by virtue of having the
|
||||||
|
<xref:SkiaSharp.SKAutoCanvasRestore.Dispose> method restore the canvas state to
|
||||||
|
the state it was when this instance was created.
|
||||||
|
|
||||||
|
## Examples
|
||||||
|
|
||||||
|
```csharp
|
||||||
|
SKCanvas canvas = ...;
|
||||||
|
|
||||||
using (new SKAutoCanvasRestore(canvas)) {
|
using (new SKAutoCanvasRestore(canvas)) {
|
||||||
// perform some transform
|
// perform some transform
|
||||||
|
@ -34,9 +43,9 @@ using (new SKAutoCanvasRestore(canvas)) {
|
||||||
canavs.DrawRect (10, 10, 100, 100, paint);
|
canavs.DrawRect (10, 10, 100, 100, paint);
|
||||||
|
|
||||||
// automatically restore to original transform
|
// automatically restore to original transform
|
||||||
}]]></code>
|
}
|
||||||
</example>
|
```
|
||||||
<para></para>
|
]]></format>
|
||||||
</remarks>
|
</remarks>
|
||||||
</Docs>
|
</Docs>
|
||||||
<Members>
|
<Members>
|
||||||
|
|
|
@ -19,10 +19,18 @@
|
||||||
<Docs>
|
<Docs>
|
||||||
<summary>Convenience class used to lock and unlock the bitmap pixels in a using statement.</summary>
|
<summary>Convenience class used to lock and unlock the bitmap pixels in a using statement.</summary>
|
||||||
<remarks>
|
<remarks>
|
||||||
<para>This class can be used in a using statement to lock the pixels of the bitmap allowing you to read those pixels. The pixels are automatically unlocked by virtue of having the <see cref="M:SkiaSharp.SKAutoLockPixels.Dispose" /> method unlock the bitmap pixels.</para>
|
<format type="text/markdown"><![CDATA[
|
||||||
<para></para>
|
## Remarks
|
||||||
<example>
|
|
||||||
<code lang="C#"><![CDATA[SKBitmap bitmap = ...;
|
This class can be used in a using statement to lock the pixels of the bitmap
|
||||||
|
allowing you to read those pixels. The pixels are automatically unlocked by
|
||||||
|
virtue of having the <xref:SkiaSharp.SKAutoLockPixels.Dispose> method unlock
|
||||||
|
the bitmap pixels.
|
||||||
|
|
||||||
|
## Examples
|
||||||
|
|
||||||
|
```csharp
|
||||||
|
SKBitmap bitmap = ...;
|
||||||
|
|
||||||
using (new SKAutoLockPixels(bitmap)) {
|
using (new SKAutoLockPixels(bitmap)) {
|
||||||
// get a pointer to the pixels
|
// get a pointer to the pixels
|
||||||
|
@ -31,9 +39,9 @@ using (new SKAutoLockPixels(bitmap)) {
|
||||||
// use the pointer
|
// use the pointer
|
||||||
|
|
||||||
// automatically unlock the pixels
|
// automatically unlock the pixels
|
||||||
}]]></code>
|
}
|
||||||
</example>
|
```
|
||||||
<para></para>
|
]]></format>
|
||||||
</remarks>
|
</remarks>
|
||||||
</Docs>
|
</Docs>
|
||||||
<Members>
|
<Members>
|
||||||
|
|
|
@ -20,10 +20,17 @@
|
||||||
<Docs>
|
<Docs>
|
||||||
<summary>Convenience class used to automatically free the image data for a mask in a using statement.</summary>
|
<summary>Convenience class used to automatically free the image data for a mask in a using statement.</summary>
|
||||||
<remarks>
|
<remarks>
|
||||||
<para>This class can be used in a using statement to automatically free the image data of a mask by virtue of having the <see cref="M:SkiaSharp.SKAutoMaskFreeImage.Dispose" /> method.</para>
|
<format type="text/markdown"><![CDATA[
|
||||||
<para></para>
|
## Remarks
|
||||||
<example>
|
|
||||||
<code lang="C#"><![CDATA[// some buffer
|
This class can be used in a using statement to automatically free the image
|
||||||
|
data of a mask by virtue of having the
|
||||||
|
<xref:SkiaSharp.SKAutoMaskFreeImage.Dispose> method.
|
||||||
|
|
||||||
|
## Examples
|
||||||
|
|
||||||
|
```csharp
|
||||||
|
// some buffer
|
||||||
byte[] buffer = ...;
|
byte[] buffer = ...;
|
||||||
|
|
||||||
// create the mask, allocating the image
|
// create the mask, allocating the image
|
||||||
|
@ -32,8 +39,9 @@ using (new SKAutoMaskFreeImage(mask.Image)) {
|
||||||
// use the mask
|
// use the mask
|
||||||
|
|
||||||
// automatically release the image data
|
// automatically release the image data
|
||||||
}]]></code>
|
}
|
||||||
</example>
|
```
|
||||||
|
]]></format>
|
||||||
</remarks>
|
</remarks>
|
||||||
</Docs>
|
</Docs>
|
||||||
<Members>
|
<Members>
|
||||||
|
|
|
@ -17,11 +17,17 @@
|
||||||
<Docs>
|
<Docs>
|
||||||
<summary>Wraps a <see cref="T:System.IO.Stream" /> into a <see cref="T:SkiaSharp.SKStreamAsset" /> (a seekable, rewindable Skia stream)</summary>
|
<summary>Wraps a <see cref="T:System.IO.Stream" /> into a <see cref="T:SkiaSharp.SKStreamAsset" /> (a seekable, rewindable Skia stream)</summary>
|
||||||
<remarks>
|
<remarks>
|
||||||
<para>The following example shows how to wrap a <see cref="T:System.IO.Stream" /> that represents a stream into an embedded resource in an assembly and use it with Skia APIs that use resources:</para>
|
<format type="text/markdown"><![CDATA[
|
||||||
<para></para>
|
## Remarks
|
||||||
<para></para>
|
|
||||||
<example>
|
The following example shows how to wrap a <xref:System.IO.Stream> that
|
||||||
<code lang="C#"><![CDATA[public static void BitmapShader (SKCanvas canvas, int width, int height)
|
represents a stream into an embedded resource in an assembly and use it with
|
||||||
|
SkiaSharp APIs that use resources:
|
||||||
|
|
||||||
|
## Examples
|
||||||
|
|
||||||
|
```csharp
|
||||||
|
public static void BitmapShader (SKCanvas canvas, int width, int height)
|
||||||
{
|
{
|
||||||
var assembly = typeof(Demos).GetTypeInfo ().Assembly;
|
var assembly = typeof(Demos).GetTypeInfo ().Assembly;
|
||||||
|
|
||||||
|
@ -40,8 +46,9 @@
|
||||||
canvas.DrawPaint (paint);
|
canvas.DrawPaint (paint);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}]]></code>
|
}
|
||||||
</example>
|
```
|
||||||
|
]]></format>
|
||||||
</remarks>
|
</remarks>
|
||||||
</Docs>
|
</Docs>
|
||||||
<Members>
|
<Members>
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
import groovy.transform.Field
|
import groovy.transform.Field
|
||||||
|
|
||||||
@Field def isPr = (env.ghprbPullId && !env.ghprbPullId.empty ? true : false)
|
@Field def isPr = false
|
||||||
@Field def branchName = (isPr ? "pr" : env.BRANCH_NAME)
|
@Field def branchName = null
|
||||||
@Field def commitHash = null
|
@Field def commitHash = null
|
||||||
|
@Field def githubStatusSha = null
|
||||||
@Field def linuxPackages = "xvfb xauth libfontconfig1-dev libglu1-mesa-dev g++ mono-complete msbuild curl ca-certificates-mono unzip python git referenceassemblies-pcl dotnet-sdk-2.0.0 ttf-ancient-fonts openjdk-8-jdk zip gettext openvpn acl libxcb-render-util0 libv4l-0 libsdl1.2debian libxcb-image0 bridge-utils rpm2cpio libxcb-icccm4 libwebkitgtk-1.0-0 cpio"
|
@Field def linuxPackages = "xvfb xauth libfontconfig1-dev libglu1-mesa-dev g++ mono-complete msbuild curl ca-certificates-mono unzip python git referenceassemblies-pcl dotnet-sdk-2.0.0 ttf-ancient-fonts openjdk-8-jdk zip gettext openvpn acl libxcb-render-util0 libv4l-0 libsdl1.2debian libxcb-image0 bridge-utils rpm2cpio libxcb-icccm4 libwebkitgtk-1.0-0 cpio"
|
||||||
|
|
||||||
@Field def customEnv = [
|
@Field def customEnv = [
|
||||||
|
@ -29,13 +30,20 @@ node("ubuntu-1604-amd64") {
|
||||||
timestamps {
|
timestamps {
|
||||||
checkout scm
|
checkout scm
|
||||||
commitHash = cmdResult("git rev-parse HEAD").trim()
|
commitHash = cmdResult("git rev-parse HEAD").trim()
|
||||||
|
|
||||||
|
isPr = env.ghprbPullId && !env.ghprbPullId.empty
|
||||||
|
branchName = isPr ? "pr" : env.BRANCH_NAME
|
||||||
|
githubStatusSha = isPr ? env.ghprbActualCommit : commitHash
|
||||||
|
|
||||||
|
echo "Building SHA1: ${commitHash}..."
|
||||||
|
echo " - PR: ${isPr}..."
|
||||||
|
echo " - Branch Name: ${branchName}..."
|
||||||
|
echo " - GitHub Status SHA1: ${githubStatusSha}..."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
stage("Native Builds") {
|
stage("Native Builds") {
|
||||||
parallel([
|
parallel([
|
||||||
failFast: true,
|
|
||||||
|
|
||||||
// windows
|
// windows
|
||||||
win32: createNativeBuilder("Windows", "Windows", "components-windows"),
|
win32: createNativeBuilder("Windows", "Windows", "components-windows"),
|
||||||
uwp: createNativeBuilder("UWP", "Windows", "components-windows"),
|
uwp: createNativeBuilder("UWP", "Windows", "components-windows"),
|
||||||
|
@ -58,8 +66,6 @@ node("ubuntu-1604-amd64") {
|
||||||
|
|
||||||
stage("Managed Builds") {
|
stage("Managed Builds") {
|
||||||
parallel([
|
parallel([
|
||||||
failFast: true,
|
|
||||||
|
|
||||||
windows: createManagedBuilder("Windows", "components-windows"),
|
windows: createManagedBuilder("Windows", "components-windows"),
|
||||||
macos: createManagedBuilder("macOS", "components"),
|
macos: createManagedBuilder("macOS", "components"),
|
||||||
linux: createManagedBuilder("Linux", "ubuntu-1604-amd64"),
|
linux: createManagedBuilder("Linux", "ubuntu-1604-amd64"),
|
||||||
|
@ -68,15 +74,13 @@ node("ubuntu-1604-amd64") {
|
||||||
|
|
||||||
stage("Packaging") {
|
stage("Packaging") {
|
||||||
parallel([
|
parallel([
|
||||||
failFast: true,
|
|
||||||
|
|
||||||
package: createPackagingBuilder(),
|
package: createPackagingBuilder(),
|
||||||
])
|
])
|
||||||
}
|
}
|
||||||
|
|
||||||
stage("Clean Up") {
|
stage("Clean Up") {
|
||||||
timestamps {
|
timestamps {
|
||||||
|
cleanWs()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -109,6 +113,7 @@ def createNativeBuilder(platform, host, label) {
|
||||||
|
|
||||||
uploadBlobs("native-${platform}_${host}")
|
uploadBlobs("native-${platform}_${host}")
|
||||||
|
|
||||||
|
cleanWs()
|
||||||
reportGitHubStatus(githubContext, "SUCCESS", "Build complete.")
|
reportGitHubStatus(githubContext, "SUCCESS", "Build complete.")
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
reportGitHubStatus(githubContext, "FAILURE", "Build failed.")
|
reportGitHubStatus(githubContext, "FAILURE", "Build failed.")
|
||||||
|
@ -169,6 +174,7 @@ def createManagedBuilder(host, label) {
|
||||||
|
|
||||||
uploadBlobs("managed-${host}")
|
uploadBlobs("managed-${host}")
|
||||||
|
|
||||||
|
cleanWs()
|
||||||
reportGitHubStatus(githubContext, "SUCCESS", "Build complete.")
|
reportGitHubStatus(githubContext, "SUCCESS", "Build complete.")
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
reportGitHubStatus(githubContext, "FAILURE", "Build failed.")
|
reportGitHubStatus(githubContext, "FAILURE", "Build failed.")
|
||||||
|
@ -203,6 +209,7 @@ def createPackagingBuilder() {
|
||||||
|
|
||||||
uploadBlobs("packing-${host}")
|
uploadBlobs("packing-${host}")
|
||||||
|
|
||||||
|
cleanWs()
|
||||||
reportGitHubStatus(githubContext, "SUCCESS", "Pack complete.")
|
reportGitHubStatus(githubContext, "SUCCESS", "Pack complete.")
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
reportGitHubStatus(githubContext, "FAILURE", "Pack failed.")
|
reportGitHubStatus(githubContext, "FAILURE", "Pack failed.")
|
||||||
|
@ -282,11 +289,11 @@ def reportGitHubStatus(context, statusResult, statusResultMessage) {
|
||||||
$class: "GitHubCommitStatusSetter",
|
$class: "GitHubCommitStatusSetter",
|
||||||
commitShaSource: [
|
commitShaSource: [
|
||||||
$class: "ManuallyEnteredShaSource",
|
$class: "ManuallyEnteredShaSource",
|
||||||
sha: isPr ? env.ghprbActualCommit : commitHash
|
sha: githubStatusSha
|
||||||
],
|
],
|
||||||
contextSource: [
|
contextSource: [
|
||||||
$class: "ManuallyEnteredCommitContextSource",
|
$class: "ManuallyEnteredCommitContextSource",
|
||||||
context: context
|
context: context + (isPr ? " (PR)" : "")
|
||||||
],
|
],
|
||||||
statusBackrefSource: [
|
statusBackrefSource: [
|
||||||
$class: "ManuallyEnteredBackrefSource",
|
$class: "ManuallyEnteredBackrefSource",
|
||||||
|
@ -322,6 +329,5 @@ def cmdResult(script) {
|
||||||
def getWSRoot() {
|
def getWSRoot() {
|
||||||
def cleanBranch = branchName.replace("/", "_").replace("\\", "_")
|
def cleanBranch = branchName.replace("/", "_").replace("\\", "_")
|
||||||
def wsRoot = isUnix() ? "workspace" : "C:/bld"
|
def wsRoot = isUnix() ? "workspace" : "C:/bld"
|
||||||
def pr = isPr ? "-PR" : ""
|
return "${wsRoot}/SkiaSharp/${cleanBranch}"
|
||||||
return "${wsRoot}/SkiaSharp${pr}/${cleanBranch}"
|
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче