It includes detection of browser features, maximizing a canvas within the confines of a div, setting up emulated Canvas using FlashCanvas, when needed. JSignature itself has three distinct pieces of code rolled into one minified (17k) deployable: Do not host them from separate folders as flashcanvas.js looks for flashcanvas.swf in the same folder it was served from. Note that FlashCanvas is a group of two files, flashcanvas.swf and flashcanvas.js, both of which must be located together in the same folder. Both are included, for convenience, in the /libs folder of this project, but you can certainly use your own versions. JSignature depends on (more or less recent) jQuery, and (only for IE 7 and 8) on FlashCanvas. jSignature adapts well to fixed and variable width web page designs, and various size screens (phones, tablets, computer screens) and automatically rescales the drawing area and signature when parent element changes size. jSignature automatically detects the colors used on the wrapping element (text color = pen color, background = background) and auto-picks a pleasing middle-shade for 'decor' (signature line). JSignature makes it easy to pluck itself into an existing styled site. In all cases, customer should be pleased by responsiveness and beauty of the drawing. This degrading and enhancing of screen representation of the captured signature is done on purpose to insure that rendering does not impede on the responsiveness of capture.įor example, on slow rendering devices (Android Browser, FlashCanvas-based Canvas emulation) smoothing is kicked up a notch to compensate for large gaps in captured stroke coordinates - a result of inefficiency of capture device. Rendering of strokes differs per browser's capabilities, efficiency of the device, screen size. Capture of data is always same - we capture as many movement coordinates as possible. Real-time jSignature renders only the device-appropriate "prettiest" approximation of what we capture. Same signature can be rerendered using variety of postproduction filters (scale, colorize, thicken etc) to improve presentation on printed media, small screens etc. We fall back on Flash-based Canvas element emulator (FlashCanvas) when actual Canvas is not supported by the browser (Internet Explorer v.8 and lower).Īll signature data is captured and stored internally as vectors. Ingenious line smoothing (pixel de-noising + curve fitting) and pressure simulation techniques were put together specifically for jSignature.Īll major desktop, tablet and phone browsers are supported. Although jSignature can export great bitmap (PNG) too, extraction of highly scalable stroke movement coordinates (aka vector image) of the signature allows much greater flexibility of signature rendering.Īn extra effort is made to make the strokes look pretty on the screen while these are drawn by the signor. JSignature captures signature as vector outlines of the strokes.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |