![]() ![]() Segment.FillDark = ' #004400' // Color of an off segment Segment.FillLight = ' #86fd06' // Color of an on segment Segment.SideBevelEnabled = false // Determines if the sides should be beveled 06 // Size of corner bevel (% of Element Width) 05 // Spacing between segments (% of Element Width) 16 // Width of segments (% of Element Width) Var segment = new SixteenSegment(canvas, 6) There are additional parameters you can pass to customize the display but they all have default values. The canvas parameter is the only required argument. To add a sixteen segment display to your page, create a new SixteenSegment object and pass the Canvas and number of display elements as parameters to the constructor. ![]() The first step is to download the code and include the script in your webpage. Also check out the demo page for a live example. You can find the source code at the GitHub repository. This control is a sixteen segment display that is based on the HTML5 canvas and is fully customizable and extensible. So what's better than a seven segment display? How about a sixteen segment display? Sixteen segment displays look great and can represent a wide range of characters including letters and punctuation. They are found all over the place in real world electronics and when incorporated into your UI, they can add a lot of character to your application. I love the look of a seven segment display. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |