signature widget

G.W.Gaich gWolfgang at gaich.de
Thu Jun 22 06:20:16 EDT 2023


Mike,

in one of my applications I use this code:

command saveSign
    show grc "UnterschriftRect"  -- lies behind the widget for a white 
background
    show widget "Unterschrift"

    lock screen
    if the pathData of widget "Unterschrift" is empty then exit to top
    thickenSignature "Unterschrift", 8  -- the signature is often too thin
    put 1200 into aMeta["density"]
    export snapshot from widget "Unterschrift" at size 140,70 with 
metadata aMeta["density"] to file "sign.png" as PNG

    hide grc "UnterschriftRect"
    hide widget "Unterschrift"

    unlock sceen
end saveSign

command thickenSignature pSignature,pFactor
    put the pathData of widget pSignature into tPathData
    repeat for each key tKey in tPathData
       multiply tPathData[tKey]["width"] by pFactor
    end repeat
    set the pathData of widget pSignature to tPathData
end thickenSignature

Hope this helps

Best regards
Günter
E-Mail: gwolfgang at gaich.de




Am 21.06.2023 um 22:52 schrieb Mike Kerner via use-livecode:
> i finally have a use-case for the signature widget.
> * has anyone used it?
> * does anyone have experiencing transporting the signature data, then
> recreating it, say, by adding it to a document, or generating an svg
> file?
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode





More information about the use-livecode mailing list