Object Signature.Companion

    • Constructor Detail

    • Method Detail

      • fromJson

         final Signature fromJson(JSONObject signatureJson)

        Creates a signature object by parsing the provided JSON object. The JSON object you provide should be initially obtained via toJson.

        Parameters:
        signatureJson - JSON object to parse.
        Returns:

        Signature created from the provided JSON object.

      • fromJson

         final Signature fromJson(Long id, JSONObject signatureJson)

        Creates a signature object by parsing the provided JSON object. The JSON object you provide should be initially obtained via toJson. This method also allows you to specify an id which will be assigned to the signature created from the given JSON. This id will also be assigned by the framework when retrieving the signatures from the default storage.

        Parameters:
        id - Id to be assigned to the signature.
        signatureJson - JSON object to parse.
        Returns:

        Signature created from the provided JSON object.

      • textToBitmap

         final Bitmap textToBitmap(String text, Font font, @ColorInt() Integer color, @FloatRange(from = 0.0) Float scaleFactor, DisplayMetrics displayMetrics)

        Creates a bitmap from text that the user typed and a font the user chose.

        Parameters:
        text - The text to be displayed.
        font - The font to use to show the text.
        color - The color to render the text.
        scaleFactor - A factor, always positive, by which to scale the bitmap size.
        displayMetrics - DisplayMetrics instance.
        Returns:

        a bitmap from text that the user typed and a font the user chose.