Braille Canvas Class
Braille Canvas Class
plotcli::Canvas -> BrailleCanvas
braille_baseUnicode code point for empty Braille character
Inherited methods
plotcli::Canvas$apply_colors()plotcli::Canvas$clear()plotcli::Canvas$draw_circle()plotcli::Canvas$draw_hline()plotcli::Canvas$draw_line()plotcli::Canvas$draw_points()plotcli::Canvas$draw_polygon()plotcli::Canvas$draw_polyline()plotcli::Canvas$draw_rect()plotcli::Canvas$draw_segment()plotcli::Canvas$draw_text()plotcli::Canvas$draw_vline()plotcli::Canvas$fill_area()plotcli::Canvas$fill_bar()plotcli::Canvas$fill_circle()plotcli::Canvas$fill_rect()plotcli::Canvas$print()plotcli::Canvas$render()
new()Initialize Braille canvas
BrailleCanvas$new(width, height)widthCharacter width
heightCharacter height
get_dot_bit()Get the bit value for a dot position
BrailleCanvas$get_dot_bit(dot_row, dot_col)dot_rowRow within Braille cell (0-3)
dot_colColumn within Braille cell (0-1)
Bit value
set_pixel()Set a pixel in Braille space
BrailleCanvas$set_pixel(x, y, color = NULL)xX coordinate (1-based, in pixel space: 1 to width*2)
yY coordinate (1-based, in pixel space: 1 to height*4, 1 = top)
colorOptional color name
clone()The objects of this class are cloneable with this method.
BrailleCanvas$clone(deep = FALSE)deepWhether to make a deep clone.
High-resolution canvas using Unicode Braille patterns. Resolution: 2x4 (2 horizontal, 4 vertical dots per character = 8x resolution)
Braille dot layout (dot numbers and bit values):
Col 0 Col 1 Bit values
Row 0: 1 4 0x01 0x08
Row 1: 2 5 0x02 0x10
Row 2: 3 6 0x04 0x20
Row 3: 7 8 0x40 0x80