diff --git a/src/SignaturePad.Android/SignaturePadCanvasView.cs b/src/SignaturePad.Android/SignaturePadCanvasView.cs
index c452793..33c7827 100644
--- a/src/SignaturePad.Android/SignaturePadCanvasView.cs
+++ b/src/SignaturePad.Android/SignaturePadCanvasView.cs
@@ -75,10 +75,14 @@ public float StrokeWidth
{
stroke.Width = value;
}
+
inkPresenter.Invalidate ();
}
}
+ ///
+ /// Clear the canvas and invoke event
+ ///
public void Clear ()
{
inkPresenter.Clear ();
diff --git a/src/SignaturePad.Android/SignaturePadView.cs b/src/SignaturePad.Android/SignaturePadView.cs
index a1425cb..dad3ffc 100644
--- a/src/SignaturePad.Android/SignaturePadView.cs
+++ b/src/SignaturePad.Android/SignaturePadView.cs
@@ -94,13 +94,19 @@ private void Initialize (IAttributeSet attrs)
}
public SignaturePadCanvasView SignaturePadCanvas { get; private set; }
-
+
public View SignatureLine { get; private set; }
+ ///
+ /// TextView which write text below the separator line
+ ///
public TextView Caption { get; private set; }
+ ///
+ /// TextView which write text aboce the separator line
+ ///
public TextView SignaturePrompt { get; private set; }
-
+
public TextView ClearLabel { get; private set; }
[Obsolete ("Set the background instead.")]
diff --git a/src/SignaturePad.Shared/SignaturePadCanvasView.cs b/src/SignaturePad.Shared/SignaturePadCanvasView.cs
index 51eae7a..9701b54 100644
--- a/src/SignaturePad.Shared/SignaturePadCanvasView.cs
+++ b/src/SignaturePad.Shared/SignaturePadCanvasView.cs
@@ -44,8 +44,14 @@ partial class SignaturePadCanvasView
public event EventHandler Cleared;
+ ///
+ /// Check if there is any stoke.
+ ///
public bool IsBlank => inkPresenter == null ? true : inkPresenter.GetStrokes ().Count == 0;
+ ///
+ /// Get currents points. A new line of points start with coordinate (0,0)
+ ///
public NativePoint[] Points
{
get
@@ -63,6 +69,9 @@ public NativePoint[] Points
}
}
+ ///
+ /// Get currents strokes represented by an array of array of points.
+ ///
public NativePoint[][] Strokes
{
get
@@ -77,6 +86,12 @@ public NativePoint[][] Strokes
}
}
+ ///
+ /// Get a rect containing the signature.
+ /// Some padding can be add to a max from bounds of canvas.
+ ///
+ /// Padding added to the signature.
+ /// The rect containing the signature with some padding.
public NativeRect GetSignatureBounds (float padding = 5f)
{
if (IsBlank)
@@ -436,6 +451,11 @@ private bool GetImageConstructionArguments (ImageConstructionSettings settings,
return true;
}
+ ///
+ /// Allow the user to import strokes represented by an array of an array of points.
+ /// Strokes are used to draw a signature in the view after clearing it.
+ ///
+ /// Array of array of points. Each array of points represent a line.
public void LoadStrokes (NativePoint[][] loadedStrokes)
{
// clear any existing paths or points.
diff --git a/src/SignaturePad.Shared/SignaturePadView.cs b/src/SignaturePad.Shared/SignaturePadView.cs
index 57e78c9..1063718 100644
--- a/src/SignaturePad.Shared/SignaturePadView.cs
+++ b/src/SignaturePad.Shared/SignaturePadView.cs
@@ -51,8 +51,15 @@ partial class SignaturePadView
private static readonly NativeColor SignaturePadLightColor = Windows.UI.Colors.White;
#endif
+
+ ///
+ /// Get currents strokes from the canvas. Strokes are represented by an array of array of points.
+ ///
public NativePoint[][] Strokes => SignaturePadCanvas.Strokes;
+ ///
+ /// Get currents points from the canvas. A new line of points start with coordinate (0,0)
+ ///
public NativePoint[] Points => SignaturePadCanvas.Points;
public bool IsBlank => SignaturePadCanvas?.IsBlank ?? true;
@@ -61,6 +68,9 @@ partial class SignaturePadView
public event EventHandler Cleared;
+ ///
+ /// Clear the canvas and invoke event
+ ///
public void Clear ()
{
SignaturePadCanvas.Clear ();
@@ -68,6 +78,10 @@ public void Clear ()
UpdateUi ();
}
+ ///
+ /// Allow the user to import an array of points to be used to draw a signature in the view, with new
+ /// lines indicated by a { 0, 0 } point in the array.
+ ///
public void LoadPoints (NativePoint[] points)
{
SignaturePadCanvas.LoadPoints (points);
@@ -75,6 +89,11 @@ public void LoadPoints (NativePoint[] points)
UpdateUi ();
}
+ ///
+ /// Allow the user to import strokes represented by an array of an array of points.
+ /// Strokes are used to draw a signature in the view after clearing it.
+ ///
+ /// Array of array of points. Each array of points represent a line.
public void LoadStrokes (NativePoint[][] strokes)
{
SignaturePadCanvas.LoadStrokes (strokes);