Documentation ¶
Overview ¶
Package segdisp provides utilities used by all segment display types.
Index ¶
Constants ¶
const ( // MinCols is the smallest valid amount of columns in a cell area. MinCols = 6 // MinRowPixels is the smallest valid amount of rows in a cell area. MinRows = 5 )
Minimum valid size of a cell canvas in order to draw a segment display.
Variables ¶
This section is empty.
Functions ¶
func Required ¶
Required when given an area of cells, returns either an area of the same size or a smaller area that is required to draw one segment display (i.e. one character). Returns a smaller area when the provided area didn't have the required aspect ratio. Returns an error if the area is too small to draw a segment display, i.e. smaller than MinCols x MinRows.
func SegmentSize ¶
SegmentSize given an area for the display segment determines the size of individual segments, i.e. the width of a vertical or the height of a horizontal segment.
Types ¶
This section is empty.
Directories ¶
Path | Synopsis |
---|---|
Package dotseg simulates a segment display that can draw dots.
|
Package dotseg simulates a segment display that can draw dots. |
testdotseg
Package testdotseg provides helpers for tests that use the dotseg package.
|
Package testdotseg provides helpers for tests that use the dotseg package. |
Package segment provides functions that draw a single segment.
|
Package segment provides functions that draw a single segment. |
testsegment
Package testsegment provides helpers for tests that use the segment package.
|
Package testsegment provides helpers for tests that use the segment package. |
Package sixteen simulates a 16-segment display drawn on a canvas.
|
Package sixteen simulates a 16-segment display drawn on a canvas. |
testsixteen
Package testsixteen provides helpers for tests that use the sixteen package.
|
Package testsixteen provides helpers for tests that use the sixteen package. |