Adding the 'R' methods to SKPath

- RMoveTo
 - RLineTo
 - RQuadTo
 - RConicTo
 - RCubicTo

rArcTo does not exist on this version of Skia.  Will have to
pick it up on the next bump.
This commit is contained in:
Bill Holmes 2016-04-07 21:39:13 -04:00
Родитель a6347afbd2
Коммит fa815050b0
4 изменённых файлов: 183 добавлений и 11 удалений

Просмотреть файл

@ -46,26 +46,51 @@ namespace SkiaSharp
SkiaApi.sk_path_move_to (Handle, x, y);
}
public void RMoveTo (float dx, float dy)
{
SkiaApi.sk_path_rmove_to (Handle, dx, dy);
}
public void LineTo (float x, float y)
{
SkiaApi.sk_path_line_to (Handle, x, y);
}
public void RLineTo (float dx, float dy)
{
SkiaApi.sk_path_rline_to (Handle, dx, dy);
}
public void QuadTo (float x0, float y0, float x1, float y1)
{
SkiaApi.sk_path_quad_to (Handle, x0, y0, x1, y1);
}
public void RQuadTo (float dx0, float dy0, float dx1, float dy1)
{
SkiaApi.sk_path_rquad_to (Handle, dx0, dy0, dx1, dy1);
}
public void ConicTo (float x0, float y0, float x1, float y1, float w)
{
SkiaApi.sk_path_conic_to (Handle, x0, y0, x1, y1, w);
}
public void RConicTo (float dx0, float dy0, float dx1, float dy1, float w)
{
SkiaApi.sk_path_rconic_to (Handle, dx0, dy0, dx1, dy1, w);
}
public void CubicTo (float x0, float y0, float x1, float y1, float x2, float y2)
{
SkiaApi.sk_path_cubic_to (Handle, x0, y0, x1, y1, x2, y2);
}
public void RCubicTo (float dx0, float dy0, float dx1, float dy1, float dx2, float dy2)
{
SkiaApi.sk_path_rcubic_to (Handle, dx0, dy0, dx1, dy1, dx2, dy2);
}
public void Close ()
{
SkiaApi.sk_path_close (Handle);

Просмотреть файл

@ -275,14 +275,24 @@ namespace SkiaSharp
[DllImport(SKIA, CallingConvention = CallingConvention.Cdecl)]
public extern static void sk_path_move_to(sk_path_t t, float x, float y);
[DllImport(SKIA, CallingConvention = CallingConvention.Cdecl)]
public extern static void sk_path_rmove_to(sk_path_t t, float dx, float dy);
[DllImport(SKIA, CallingConvention = CallingConvention.Cdecl)]
public extern static void sk_path_line_to(sk_path_t t, float x, float y);
[DllImport(SKIA, CallingConvention = CallingConvention.Cdecl)]
public extern static void sk_path_rline_to(sk_path_t t, float dx, float dy);
[DllImport(SKIA, CallingConvention = CallingConvention.Cdecl)]
public extern static void sk_path_quad_to(sk_path_t t, float x0, float y0, float x1, float y1);
[DllImport(SKIA, CallingConvention = CallingConvention.Cdecl)]
public extern static void sk_path_rquad_to(sk_path_t t, float dx0, float dy0, float dx1, float dy1);
[DllImport(SKIA, CallingConvention = CallingConvention.Cdecl)]
public extern static void sk_path_conic_to(sk_path_t t, float x0, float y0, float x1, float y1, float w);
[DllImport(SKIA, CallingConvention = CallingConvention.Cdecl)]
public extern static void sk_path_rconic_to(sk_path_t t, float dx0, float dy0, float dx1, float dy1, float w);
[DllImport(SKIA, CallingConvention = CallingConvention.Cdecl)]
public extern static void sk_path_cubic_to(sk_path_t t, float x0, float y0, float x1, float y1, float x2, float y2);
[DllImport(SKIA, CallingConvention = CallingConvention.Cdecl)]
public extern static void sk_path_rcubic_to(sk_path_t t, float dx0, float dy0, float dx1, float dy1, float dx2, float dy2);
[DllImport(SKIA, CallingConvention = CallingConvention.Cdecl)]
public extern static void sk_path_close(sk_path_t t);
[DllImport(SKIA, CallingConvention = CallingConvention.Cdecl)]
public extern static void sk_path_add_rect(sk_path_t t, ref SKRect rect, SKPathDirection direction);

Просмотреть файл

@ -11,9 +11,11 @@
</Base>
<Interfaces />
<Docs>
<summary>Compound geometric paths.</summary>
<summary>
<para>Same as <see cref="M:SkiaSharp.SKPath.ConicTo" /> but the coordinates are considered relative to the last point on this contour.</para>
</summary>
<remarks>
<para>The SkPath class encapsulates compound (multiple contour) geometric paths consisting of straight line segments, quadratic curves, and cubic curves.</para>
<para> If no <see cref="M:SkiaSharp.SKPath.MoveTo" /> call has been made for this contour, the first point is automatically set to (0,0).</para>
</remarks>
</Docs>
<Members>
@ -51,7 +53,7 @@
<param name="direction">The direction to wind the oval's contour.</param>
<summary>Adds an oval to the current path.</summary>
<remarks>
<para />
<para></para>
</remarks>
</Docs>
</Member>
@ -117,13 +119,16 @@
<Parameter Name="w" Type="System.Single" />
</Parameters>
<Docs>
<param name="x0">To be added.</param>
<param name="y0">To be added.</param>
<param name="x1">To be added.</param>
<param name="y1">To be added.</param>
<param name="w">To be added.</param>
<param name="x0">The x-coordinate of the control point of the conic curve.</param>
<param name="y0">The y-coordinate of the control point of the conic curve.</param>
<param name="x1">The x-coordinate of the end point of the conic curve.</param>
<param name="y1">The y-coordinate of the end point of the conic curve.</param>
<param name="w">The weight of the conic curve.</param>
<summary>Add a conic path from the last point.</summary>
<remarks>To be added.</remarks>
<remarks>
<para> If no <see cref="M:SkiaSharp.SKPath.MoveTo" /> call has been made for this contour, the first point is automatically set to (0,0).</para>
<para></para>
</remarks>
</Docs>
</Member>
<Member MemberName="CubicTo">
@ -271,7 +276,7 @@
<param name="y">The y-coordinate of the start of a new contour</param>
<summary>Set the beginning of the next contour to the point.</summary>
<remarks>
<para />
<para></para>
</remarks>
</Docs>
</Member>
@ -303,5 +308,137 @@
</remarks>
</Docs>
</Member>
<Member MemberName="RConicTo">
<MemberSignature Language="C#" Value="public void RConicTo (float dx0, float dy0, float dx1, float dy1, float w);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance void RConicTo(float32 dx0, float32 dy0, float32 dx1, float32 dy1, float32 w) cil managed" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.49.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="dx0" Type="System.Single" />
<Parameter Name="dy0" Type="System.Single" />
<Parameter Name="dx1" Type="System.Single" />
<Parameter Name="dy1" Type="System.Single" />
<Parameter Name="w" Type="System.Single" />
</Parameters>
<Docs>
<param name="dx0">The amount to add to the x-coordinate of the last point on this contour, to specify the control point of the conic curve.</param>
<param name="dy0">The amount to add to the y-coordinate of the last point on this contour, to specify the control point of the conic curve.</param>
<param name="dx1">The amount to add to the x-coordinate of the last point on this contour, to specify the end point of the conic curve.</param>
<param name="dy1">The amount to add to the y-coordinate of the last point on this contour, to specify the end point of the conic curve.</param>
<param name="w">The weight of the conic curve.</param>
<summary>
<para>Same as <see cref="M:SkiaSharp.SKPath.ConicTo" /> but the coordinates are considered relative to the last point on this contour.</para>
</summary>
<remarks>
<para> If no <see cref="M:SkiaSharp.SKPath.MoveTo" /> call has been made for this contour, the first point is automatically set to (0,0).</para>
</remarks>
</Docs>
</Member>
<Member MemberName="RCubicTo">
<MemberSignature Language="C#" Value="public void RCubicTo (float dx0, float dy0, float dx1, float dy1, float dx2, float dy2);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance void RCubicTo(float32 dx0, float32 dy0, float32 dx1, float32 dy1, float32 dx2, float32 dy2) cil managed" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.49.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="dx0" Type="System.Single" />
<Parameter Name="dy0" Type="System.Single" />
<Parameter Name="dx1" Type="System.Single" />
<Parameter Name="dy1" Type="System.Single" />
<Parameter Name="dx2" Type="System.Single" />
<Parameter Name="dy2" Type="System.Single" />
</Parameters>
<Docs>
<param name="dx0">The amount to add to the x-coordinate of the last point on this contour, to specify the 1st control point on a cubic curve.</param>
<param name="dy0">The amount to add to the y-coordinate of the last point on this contour, to specify the 1st control point on a cubic curve.</param>
<param name="dx1">The amount to add to the x-coordinate of the last point on this contour, to specify the 2nd control point on a cubic curve.</param>
<param name="dy1">The amount to add to the y-coordinate of the last point on this contour, to specify the 2nd control point on a cubic curve.</param>
<param name="dx2">The amount to add to the x-coordinate of the last point on this contour, to specify the end point on a cubic curve.</param>
<param name="dy2">The amount to add to the y-coordinate of the last point on this contour, to specify the end point on a cubic curve.</param>
<summary>Same as <see cref="M:SkiaSharp.SKPath.CubicTo" /> but the coordinates are considered relative to the last point on this contour.</summary>
<remarks>
<para> If no <see cref="M:SkiaSharp.SKPath.MoveTo" /> call has been made for this contour, the first point is automatically set to (0,0).</para>
<para></para>
</remarks>
</Docs>
</Member>
<Member MemberName="RLineTo">
<MemberSignature Language="C#" Value="public void RLineTo (float dx, float dy);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance void RLineTo(float32 dx, float32 dy) cil managed" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.49.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="dx" Type="System.Single" />
<Parameter Name="dy" Type="System.Single" />
</Parameters>
<Docs>
<param name="dx">The amount to add to the x-coordinate of the last point on this contour, to specify the end of a line.</param>
<param name="dy">The amount to add to the y-coordinate of the last point on this contour, to specify the end of a line.</param>
<summary>Same as <see cref="M:SkiaSharp.SKPath.LineTo" /> but the coordinates are considered relative to the last point on this contour.</summary>
<remarks> If no <see cref="M:SkiaSharp.SKPath.MoveTo" /> call has been made for this contour, the first point is automatically set to (0,0).</remarks>
</Docs>
</Member>
<Member MemberName="RMoveTo">
<MemberSignature Language="C#" Value="public void RMoveTo (float dx, float dy);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance void RMoveTo(float32 dx, float32 dy) cil managed" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.49.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="dx" Type="System.Single" />
<Parameter Name="dy" Type="System.Single" />
</Parameters>
<Docs>
<param name="dx">The amount to add to the x-coordinate of the last point on this contour, to specify the start of a new contour.</param>
<param name="dy">The amount to add to the x-coordinate of the last point on this contour, to specify the start of a new contour.</param>
<summary>Same as <see cref="M:SkiaSharp.SKPath.MoveTo" /> but the coordinates are considered relative to the last point on this contour.</summary>
<remarks>
<para></para>
</remarks>
</Docs>
</Member>
<Member MemberName="RQuadTo">
<MemberSignature Language="C#" Value="public void RQuadTo (float dx0, float dy0, float dx1, float dy1);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance void RQuadTo(float32 dx0, float32 dy0, float32 dx1, float32 dy1) cil managed" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.49.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="dx0" Type="System.Single" />
<Parameter Name="dy0" Type="System.Single" />
<Parameter Name="dx1" Type="System.Single" />
<Parameter Name="dy1" Type="System.Single" />
</Parameters>
<Docs>
<param name="dx0">The amount to add to the x-coordinate of the last point on this contour, to specify the control point on a quadratic curve.</param>
<param name="dy0">The amount to add to the y-coordinate of the last point on this contour, to specify the control point on a quadratic curve.</param>
<param name="dx1">The amount to add to the x-coordinate of the last point on this contour, to specify end point on a quadratic curve.</param>
<param name="dy1">The amount to add to the y-coordinate of the last point on this contour, to specify end point on a quadratic curve.</param>
<summary>Same as <see cref="M:SkiaSharp.SKPath.QuadTo" /> but the coordinates are considered relative to the last point on this contour.</summary>
<remarks> If no <see cref="M:SkiaSharp.SKPath.MoveTo" /> call has been made for this contour, the first point is automatically set to (0,0).</remarks>
</Docs>
</Member>
</Members>
</Type>

2
skia

@ -1 +1 @@
Subproject commit 7040874fcbcfbfd7222d4ab57b365a29143c7e8d
Subproject commit 5f60ff4a1b531cc192c3b9a46e8f3ddc87d16c2c