Amulet Widgets
Amulet Widgets Control Widgets
Amulet Widgets Scribble
The Scribble Widget allows for freehand drawing on a canvas. Assuming a stylus is being used, when the stylus sets down in the canvas of the Scribble Widget and starts moving within the canvas, a freehand line is drawn, following the directions of the stylus. The freehand line can be 1 to 15 pixels thick and can be any color. The Scribble canvas can have an optional background image and border. The background image, if specified, is the first image that is shown upon entering the page unless the initBackground attribute is set to FALSE. An InterWidget Communications method, uploadImage(), allows for another widget/object to make the Scribble Widget transfer the raw image data to an external processor via an xmodem protocol. The raw image is in the Amulet bitmap format.
If the Scribble canvas is saved using the IWC method saveCanvas(), the current state of the visible canvas is saved to the serial data flash, overwriting the current image specified by the canvas attribute. If it is desired to keep an initial image to be displayed upon page loading and you are using the saveCanvas(), you must use the background attribute to specify a separate initial image that will not get overwritten.
Parameter="invisible" value="CHECKED" or "UNCHECKED" — Specifies if the Scribble Widget is to start out invisible or not. If the attribute is not CHECKED, then by default the Scribble Widget is visible. If the Scribble Widget starts out invisible, the only way to make it visible again is via the IWC method reappear().
Parameter="canvas" value="image" — Specifies the image used for the canvas of the Scribble Widget. This is a required parameter. The canvas can contain a background image or it can be a completely blank image, but the dimensions of the canvas MUST be exactly the same as the dimensions of the Scribble Widget. If the canvas is saved, the image overwrites the existing canvas image. If the initial image is desired to be saved, use the background attribute. Image file must be of type .GIF, .JPG, or .PNG.
Parameter="href" value="function" — The function invoked upon receiving the uploadImage() IWC method. Only valid function is currently Amulet:UART.xmodemUploadImage().
Parameter="lineColor" value= See color entry conventions — Specifies the color of the active freehand drawing line. See section on colors for more information. If no line color is specified, the default color is black. If the alpha is FF, then the line color is fully opaque.
Parameter="lineWeight" value="pixels" — Defines the weight (thickness) of the active freehand drawing line in pixels. The range is 1- 15 (0x01 - 0x0F).
Parameter="border" value="number" — Specifies width, in pixels, of the border around the dimensions of the Scribble Widget. Default is 0, meaning no border.
Parameter="borderColor" value=See color entry conventions — Specifies the color of the border around the dimensions of the Scribble Widget. See section on colors for more information. If no border color is specified, the default color is black. Only applicable if border has a value of 1 or greater. If the alpha is FF, then the border color is fully opaque.
Parameter="background" value="image" — Specifies the optional background image used for the canvas of the Scribble Widget. This is an optional parameter. The image does not have to be the exact same dimensions as the Scribble Widget, but it will start drawing the background image from the topleft corner of the Scribble Widget. By default, the background image is initially displayed upon page load. If the canvas is saved, it will replace the canvas image and the background image will be left untouched. Image file must be of type .GIF, .JPG, or .PNG.
Parameter="initImage" value="Canvas" or "Background" or "Fillcolor" — Specifies if the background image is displayed initially upon page load. If set to Canvas, the canvas image is displayed initially upon page load. Defaults to Canvas if initImage is not specified.
Parameter="fillColor" value= See color entry conventions — Specifies the desired lineplot line color. See section on colors for more information. If no fill color is specified, the default color is white. If backgroundImage specified, fillColor is not used. If the alpha is FF, then the fill color is fully opaque.

Start Here
Development Tools
| Site Use Terms | Terms of Sale | Privacy | Warranty | Site Map | |