plotcli-py 0.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- CLAUDE.md +51 -0
- LICENSE +21 -0
- PKG-INFO +358 -0
- README.md +340 -0
- main.py +6 -0
- plotcli-original/.Rbuildignore +18 -0
- plotcli-original/.github/workflows/deploy_docs.yml +43 -0
- plotcli-original/.gitignore +46 -0
- plotcli-original/DESCRIPTION +25 -0
- plotcli-original/NAMESPACE +60 -0
- plotcli-original/NEWS.md +112 -0
- plotcli-original/R/ascii_escape.r +13 -0
- plotcli-original/R/canvas.r +586 -0
- plotcli-original/R/class_functions.r +114 -0
- plotcli-original/R/geom_registry.r +1376 -0
- plotcli-original/R/ggplotcli.r +234 -0
- plotcli-original/R/ggplotcli_helpers.r +1099 -0
- plotcli-original/R/helper_functions.r +351 -0
- plotcli-original/R/plotcli.r +963 -0
- plotcli-original/R/plotcli_grid.r +1 -0
- plotcli-original/R/plotcli_wrappers.r +416 -0
- plotcli-original/R/zzz.r +15 -0
- plotcli-original/README.md +192 -0
- plotcli-original/docs/ascii.png +0 -0
- plotcli-original/docs/bar.png +0 -0
- plotcli-original/docs/block.png +0 -0
- plotcli-original/docs/boxplot.png +0 -0
- plotcli-original/docs/density.png +0 -0
- plotcli-original/docs/facet.png +0 -0
- plotcli-original/docs/facet_grid.png +0 -0
- plotcli-original/docs/generate_png.sh +137 -0
- plotcli-original/docs/heatmap.png +0 -0
- plotcli-original/docs/histogram.png +0 -0
- plotcli-original/docs/line.png +0 -0
- plotcli-original/docs/noborder.png +0 -0
- plotcli-original/docs/scatter.png +0 -0
- plotcli-original/docs/showcase.R +182 -0
- plotcli-original/inst/doc/ggplotcli.R +231 -0
- plotcli-original/inst/doc/ggplotcli.Rmd +329 -0
- plotcli-original/inst/doc/ggplotcli.html +1078 -0
- plotcli-original/inst/doc/plotcli_class.R +98 -0
- plotcli-original/inst/doc/plotcli_class.Rmd +121 -0
- plotcli-original/inst/doc/plotcli_class.html +564 -0
- plotcli-original/inst/doc/plotcli_wrappers.R +35 -0
- plotcli-original/inst/doc/plotcli_wrappers.Rmd +62 -0
- plotcli-original/inst/doc/plotcli_wrappers.html +546 -0
- plotcli-original/man/AsciiCanvas.Rd +116 -0
- plotcli-original/man/BlockCanvas.Rd +132 -0
- plotcli-original/man/BrailleCanvas.Rd +146 -0
- plotcli-original/man/Canvas.Rd +492 -0
- plotcli-original/man/GeomRegistry.Rd +9 -0
- plotcli-original/man/add_legend_to_output.Rd +12 -0
- plotcli-original/man/braille_dot_bit.Rd +29 -0
- plotcli-original/man/braille_set_dot.Rd +21 -0
- plotcli-original/man/bresenham.Rd +27 -0
- plotcli-original/man/build_plot_output.Rd +28 -0
- plotcli-original/man/build_plot_output_v2.Rd +41 -0
- plotcli-original/man/cat_plot_matrix.Rd +17 -0
- plotcli-original/man/cbind.plotcli.Rd +19 -0
- plotcli-original/man/cbind_plots.Rd +17 -0
- plotcli-original/man/color_to_term.Rd +18 -0
- plotcli-original/man/create_canvas.Rd +21 -0
- plotcli-original/man/create_panel_scales.Rd +29 -0
- plotcli-original/man/create_scales.Rd +27 -0
- plotcli-original/man/dot-geom_registry.Rd +16 -0
- plotcli-original/man/draw_border.Rd +12 -0
- plotcli-original/man/draw_grid.Rd +12 -0
- plotcli-original/man/extract_legend_info.Rd +12 -0
- plotcli-original/man/extract_plot_labels.Rd +12 -0
- plotcli-original/man/extract_plot_style.Rd +12 -0
- plotcli-original/man/format_axis_label.Rd +18 -0
- plotcli-original/man/format_four_chars.Rd +21 -0
- plotcli-original/man/geom_area_handler.Rd +12 -0
- plotcli-original/man/geom_bar_handler.Rd +12 -0
- plotcli-original/man/geom_boxplot_handler.Rd +13 -0
- plotcli-original/man/geom_density_handler.Rd +12 -0
- plotcli-original/man/geom_histogram_handler.Rd +12 -0
- plotcli-original/man/geom_hline_handler.Rd +12 -0
- plotcli-original/man/geom_line_handler.Rd +12 -0
- plotcli-original/man/geom_path_handler.Rd +12 -0
- plotcli-original/man/geom_point_handler.Rd +12 -0
- plotcli-original/man/geom_rect_handler.Rd +12 -0
- plotcli-original/man/geom_segment_handler.Rd +12 -0
- plotcli-original/man/geom_smooth_handler.Rd +12 -0
- plotcli-original/man/geom_text_handler.Rd +12 -0
- plotcli-original/man/geom_vline_handler.Rd +12 -0
- plotcli-original/man/get_color_hue.Rd +18 -0
- plotcli-original/man/get_data_subset.Rd +23 -0
- plotcli-original/man/get_facet_info.Rd +18 -0
- plotcli-original/man/get_geom_handler.Rd +17 -0
- plotcli-original/man/get_term_colors.Rd +21 -0
- plotcli-original/man/ggplotcli.Rd +83 -0
- plotcli-original/man/init_color_mapping.Rd +15 -0
- plotcli-original/man/is_braille.Rd +20 -0
- plotcli-original/man/is_geom_registered.Rd +17 -0
- plotcli-original/man/list_registered_geoms.Rd +14 -0
- plotcli-original/man/make_colored.Rd +23 -0
- plotcli-original/man/make_unique_names.Rd +20 -0
- plotcli-original/man/normalize_data.Rd +27 -0
- plotcli-original/man/pclib.Rd +48 -0
- plotcli-original/man/pclibx.Rd +46 -0
- plotcli-original/man/pclid.Rd +44 -0
- plotcli-original/man/pclih.Rd +50 -0
- plotcli-original/man/pclil.Rd +48 -0
- plotcli-original/man/pclis.Rd +48 -0
- plotcli-original/man/pixel_to_braille.Rd +23 -0
- plotcli-original/man/plotcli.Rd +598 -0
- plotcli-original/man/plotcli_bar.Rd +48 -0
- plotcli-original/man/plotcli_box.Rd +46 -0
- plotcli-original/man/plotcli_density.Rd +44 -0
- plotcli-original/man/plotcli_histogram.Rd +50 -0
- plotcli-original/man/plotcli_line.Rd +48 -0
- plotcli-original/man/plotcli_options.Rd +18 -0
- plotcli-original/man/plotcli_scatter.Rd +48 -0
- plotcli-original/man/plus-.plotcli.Rd +19 -0
- plotcli-original/man/rbind.plotcli.Rd +19 -0
- plotcli-original/man/rbind_plots.Rd +17 -0
- plotcli-original/man/register_geom.Rd +21 -0
- plotcli-original/man/remove_color_codes.Rd +21 -0
- plotcli-original/man/render_faceted_plot.Rd +25 -0
- plotcli-original/man/render_single_panel.Rd +12 -0
- plotcli-original/man/safe_aes_name.Rd +18 -0
- plotcli-original/tests/testthat/test-new-geoms.R +136 -0
- plotcli-original/tests/testthat/test-plotcli.R +69 -0
- plotcli-original/tests/testthat.R +4 -0
- plotcli-original/vignettes/ggplotcli.Rmd +329 -0
- plotcli-original/vignettes/plotcli_class.R +98 -0
- plotcli-original/vignettes/plotcli_class.Rmd +121 -0
- plotcli-original/vignettes/plotcli_wrappers.R +35 -0
- plotcli-original/vignettes/plotcli_wrappers.Rmd +62 -0
- plotcli.egg-info/PKG-INFO +11 -0
- plotcli.egg-info/SOURCES.txt +7 -0
- plotcli.egg-info/dependency_links.txt +1 -0
- plotcli.egg-info/entry_points.txt +3 -0
- plotcli.egg-info/top_level.txt +1 -0
- plotcli.py +978 -0
- plotcli_py-0.1.0.dist-info/METADATA +358 -0
- plotcli_py-0.1.0.dist-info/RECORD +143 -0
- plotcli_py-0.1.0.dist-info/WHEEL +4 -0
- plotcli_py-0.1.0.dist-info/entry_points.txt +2 -0
- plotcli_py-0.1.0.dist-info/licenses/LICENSE +21 -0
- pyproject.toml +31 -0
- uv.lock +8 -0
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
% Generated by roxygen2: do not edit by hand
|
|
2
|
+
% Please edit documentation in R/canvas.r
|
|
3
|
+
\name{AsciiCanvas}
|
|
4
|
+
\alias{AsciiCanvas}
|
|
5
|
+
\title{ASCII Canvas Class}
|
|
6
|
+
\description{
|
|
7
|
+
ASCII Canvas Class
|
|
8
|
+
|
|
9
|
+
ASCII Canvas Class
|
|
10
|
+
}
|
|
11
|
+
\details{
|
|
12
|
+
Simple canvas using basic ASCII characters.
|
|
13
|
+
Resolution: 1x1 (one pixel per character)
|
|
14
|
+
}
|
|
15
|
+
\section{Super class}{
|
|
16
|
+
\code{\link[plotcli:Canvas]{plotcli::Canvas}} -> \code{AsciiCanvas}
|
|
17
|
+
}
|
|
18
|
+
\section{Public fields}{
|
|
19
|
+
\if{html}{\out{<div class="r6-fields">}}
|
|
20
|
+
\describe{
|
|
21
|
+
\item{\code{point_char}}{Character used for points}
|
|
22
|
+
}
|
|
23
|
+
\if{html}{\out{</div>}}
|
|
24
|
+
}
|
|
25
|
+
\section{Methods}{
|
|
26
|
+
\subsection{Public methods}{
|
|
27
|
+
\itemize{
|
|
28
|
+
\item \href{#method-AsciiCanvas-new}{\code{AsciiCanvas$new()}}
|
|
29
|
+
\item \href{#method-AsciiCanvas-set_pixel}{\code{AsciiCanvas$set_pixel()}}
|
|
30
|
+
\item \href{#method-AsciiCanvas-clone}{\code{AsciiCanvas$clone()}}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
\if{html}{\out{
|
|
34
|
+
<details><summary>Inherited methods</summary>
|
|
35
|
+
<ul>
|
|
36
|
+
<li><span class="pkg-link" data-pkg="plotcli" data-topic="Canvas" data-id="apply_colors"><a href='../../plotcli/html/Canvas.html#method-Canvas-apply_colors'><code>plotcli::Canvas$apply_colors()</code></a></span></li>
|
|
37
|
+
<li><span class="pkg-link" data-pkg="plotcli" data-topic="Canvas" data-id="clear"><a href='../../plotcli/html/Canvas.html#method-Canvas-clear'><code>plotcli::Canvas$clear()</code></a></span></li>
|
|
38
|
+
<li><span class="pkg-link" data-pkg="plotcli" data-topic="Canvas" data-id="draw_circle"><a href='../../plotcli/html/Canvas.html#method-Canvas-draw_circle'><code>plotcli::Canvas$draw_circle()</code></a></span></li>
|
|
39
|
+
<li><span class="pkg-link" data-pkg="plotcli" data-topic="Canvas" data-id="draw_hline"><a href='../../plotcli/html/Canvas.html#method-Canvas-draw_hline'><code>plotcli::Canvas$draw_hline()</code></a></span></li>
|
|
40
|
+
<li><span class="pkg-link" data-pkg="plotcli" data-topic="Canvas" data-id="draw_line"><a href='../../plotcli/html/Canvas.html#method-Canvas-draw_line'><code>plotcli::Canvas$draw_line()</code></a></span></li>
|
|
41
|
+
<li><span class="pkg-link" data-pkg="plotcli" data-topic="Canvas" data-id="draw_points"><a href='../../plotcli/html/Canvas.html#method-Canvas-draw_points'><code>plotcli::Canvas$draw_points()</code></a></span></li>
|
|
42
|
+
<li><span class="pkg-link" data-pkg="plotcli" data-topic="Canvas" data-id="draw_polygon"><a href='../../plotcli/html/Canvas.html#method-Canvas-draw_polygon'><code>plotcli::Canvas$draw_polygon()</code></a></span></li>
|
|
43
|
+
<li><span class="pkg-link" data-pkg="plotcli" data-topic="Canvas" data-id="draw_polyline"><a href='../../plotcli/html/Canvas.html#method-Canvas-draw_polyline'><code>plotcli::Canvas$draw_polyline()</code></a></span></li>
|
|
44
|
+
<li><span class="pkg-link" data-pkg="plotcli" data-topic="Canvas" data-id="draw_rect"><a href='../../plotcli/html/Canvas.html#method-Canvas-draw_rect'><code>plotcli::Canvas$draw_rect()</code></a></span></li>
|
|
45
|
+
<li><span class="pkg-link" data-pkg="plotcli" data-topic="Canvas" data-id="draw_segment"><a href='../../plotcli/html/Canvas.html#method-Canvas-draw_segment'><code>plotcli::Canvas$draw_segment()</code></a></span></li>
|
|
46
|
+
<li><span class="pkg-link" data-pkg="plotcli" data-topic="Canvas" data-id="draw_text"><a href='../../plotcli/html/Canvas.html#method-Canvas-draw_text'><code>plotcli::Canvas$draw_text()</code></a></span></li>
|
|
47
|
+
<li><span class="pkg-link" data-pkg="plotcli" data-topic="Canvas" data-id="draw_vline"><a href='../../plotcli/html/Canvas.html#method-Canvas-draw_vline'><code>plotcli::Canvas$draw_vline()</code></a></span></li>
|
|
48
|
+
<li><span class="pkg-link" data-pkg="plotcli" data-topic="Canvas" data-id="fill_area"><a href='../../plotcli/html/Canvas.html#method-Canvas-fill_area'><code>plotcli::Canvas$fill_area()</code></a></span></li>
|
|
49
|
+
<li><span class="pkg-link" data-pkg="plotcli" data-topic="Canvas" data-id="fill_bar"><a href='../../plotcli/html/Canvas.html#method-Canvas-fill_bar'><code>plotcli::Canvas$fill_bar()</code></a></span></li>
|
|
50
|
+
<li><span class="pkg-link" data-pkg="plotcli" data-topic="Canvas" data-id="fill_circle"><a href='../../plotcli/html/Canvas.html#method-Canvas-fill_circle'><code>plotcli::Canvas$fill_circle()</code></a></span></li>
|
|
51
|
+
<li><span class="pkg-link" data-pkg="plotcli" data-topic="Canvas" data-id="fill_rect"><a href='../../plotcli/html/Canvas.html#method-Canvas-fill_rect'><code>plotcli::Canvas$fill_rect()</code></a></span></li>
|
|
52
|
+
<li><span class="pkg-link" data-pkg="plotcli" data-topic="Canvas" data-id="print"><a href='../../plotcli/html/Canvas.html#method-Canvas-print'><code>plotcli::Canvas$print()</code></a></span></li>
|
|
53
|
+
<li><span class="pkg-link" data-pkg="plotcli" data-topic="Canvas" data-id="render"><a href='../../plotcli/html/Canvas.html#method-Canvas-render'><code>plotcli::Canvas$render()</code></a></span></li>
|
|
54
|
+
</ul>
|
|
55
|
+
</details>
|
|
56
|
+
}}
|
|
57
|
+
\if{html}{\out{<hr>}}
|
|
58
|
+
\if{html}{\out{<a id="method-AsciiCanvas-new"></a>}}
|
|
59
|
+
\if{latex}{\out{\hypertarget{method-AsciiCanvas-new}{}}}
|
|
60
|
+
\subsection{Method \code{new()}}{
|
|
61
|
+
Initialize ASCII canvas
|
|
62
|
+
\subsection{Usage}{
|
|
63
|
+
\if{html}{\out{<div class="r">}}\preformatted{AsciiCanvas$new(width, height, point_char = "*")}\if{html}{\out{</div>}}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
\subsection{Arguments}{
|
|
67
|
+
\if{html}{\out{<div class="arguments">}}
|
|
68
|
+
\describe{
|
|
69
|
+
\item{\code{width}}{Character width}
|
|
70
|
+
|
|
71
|
+
\item{\code{height}}{Character height}
|
|
72
|
+
|
|
73
|
+
\item{\code{point_char}}{Character to use for points (default "*")}
|
|
74
|
+
}
|
|
75
|
+
\if{html}{\out{</div>}}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
\if{html}{\out{<hr>}}
|
|
79
|
+
\if{html}{\out{<a id="method-AsciiCanvas-set_pixel"></a>}}
|
|
80
|
+
\if{latex}{\out{\hypertarget{method-AsciiCanvas-set_pixel}{}}}
|
|
81
|
+
\subsection{Method \code{set_pixel()}}{
|
|
82
|
+
Set a pixel
|
|
83
|
+
\subsection{Usage}{
|
|
84
|
+
\if{html}{\out{<div class="r">}}\preformatted{AsciiCanvas$set_pixel(x, y, color = NULL)}\if{html}{\out{</div>}}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
\subsection{Arguments}{
|
|
88
|
+
\if{html}{\out{<div class="arguments">}}
|
|
89
|
+
\describe{
|
|
90
|
+
\item{\code{x}}{X coordinate (1-based)}
|
|
91
|
+
|
|
92
|
+
\item{\code{y}}{Y coordinate (1-based, 1 = top)}
|
|
93
|
+
|
|
94
|
+
\item{\code{color}}{Optional color name}
|
|
95
|
+
}
|
|
96
|
+
\if{html}{\out{</div>}}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
\if{html}{\out{<hr>}}
|
|
100
|
+
\if{html}{\out{<a id="method-AsciiCanvas-clone"></a>}}
|
|
101
|
+
\if{latex}{\out{\hypertarget{method-AsciiCanvas-clone}{}}}
|
|
102
|
+
\subsection{Method \code{clone()}}{
|
|
103
|
+
The objects of this class are cloneable with this method.
|
|
104
|
+
\subsection{Usage}{
|
|
105
|
+
\if{html}{\out{<div class="r">}}\preformatted{AsciiCanvas$clone(deep = FALSE)}\if{html}{\out{</div>}}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
\subsection{Arguments}{
|
|
109
|
+
\if{html}{\out{<div class="arguments">}}
|
|
110
|
+
\describe{
|
|
111
|
+
\item{\code{deep}}{Whether to make a deep clone.}
|
|
112
|
+
}
|
|
113
|
+
\if{html}{\out{</div>}}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
% Generated by roxygen2: do not edit by hand
|
|
2
|
+
% Please edit documentation in R/canvas.r
|
|
3
|
+
\name{BlockCanvas}
|
|
4
|
+
\alias{BlockCanvas}
|
|
5
|
+
\title{Block Canvas Class}
|
|
6
|
+
\description{
|
|
7
|
+
Block Canvas Class
|
|
8
|
+
|
|
9
|
+
Block Canvas Class
|
|
10
|
+
}
|
|
11
|
+
\details{
|
|
12
|
+
Canvas using Unicode block elements for 2x vertical resolution.
|
|
13
|
+
Uses half-block characters: upper half (U+2580), lower half (U+2584), full block (U+2588).
|
|
14
|
+
|
|
15
|
+
Resolution: 1x2 (1 horizontal, 2 vertical pixels per character)
|
|
16
|
+
}
|
|
17
|
+
\section{Super class}{
|
|
18
|
+
\code{\link[plotcli:Canvas]{plotcli::Canvas}} -> \code{BlockCanvas}
|
|
19
|
+
}
|
|
20
|
+
\section{Public fields}{
|
|
21
|
+
\if{html}{\out{<div class="r6-fields">}}
|
|
22
|
+
\describe{
|
|
23
|
+
\item{\code{upper_block}}{Upper half block character}
|
|
24
|
+
|
|
25
|
+
\item{\code{lower_block}}{Lower half block character}
|
|
26
|
+
|
|
27
|
+
\item{\code{full_block}}{Full block character}
|
|
28
|
+
|
|
29
|
+
\item{\code{pixel_state}}{Matrix tracking which half-pixels are set (0=none, 1=upper, 2=lower, 3=both)}
|
|
30
|
+
}
|
|
31
|
+
\if{html}{\out{</div>}}
|
|
32
|
+
}
|
|
33
|
+
\section{Methods}{
|
|
34
|
+
\subsection{Public methods}{
|
|
35
|
+
\itemize{
|
|
36
|
+
\item \href{#method-BlockCanvas-new}{\code{BlockCanvas$new()}}
|
|
37
|
+
\item \href{#method-BlockCanvas-set_pixel}{\code{BlockCanvas$set_pixel()}}
|
|
38
|
+
\item \href{#method-BlockCanvas-clear}{\code{BlockCanvas$clear()}}
|
|
39
|
+
\item \href{#method-BlockCanvas-clone}{\code{BlockCanvas$clone()}}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
\if{html}{\out{
|
|
43
|
+
<details><summary>Inherited methods</summary>
|
|
44
|
+
<ul>
|
|
45
|
+
<li><span class="pkg-link" data-pkg="plotcli" data-topic="Canvas" data-id="apply_colors"><a href='../../plotcli/html/Canvas.html#method-Canvas-apply_colors'><code>plotcli::Canvas$apply_colors()</code></a></span></li>
|
|
46
|
+
<li><span class="pkg-link" data-pkg="plotcli" data-topic="Canvas" data-id="draw_circle"><a href='../../plotcli/html/Canvas.html#method-Canvas-draw_circle'><code>plotcli::Canvas$draw_circle()</code></a></span></li>
|
|
47
|
+
<li><span class="pkg-link" data-pkg="plotcli" data-topic="Canvas" data-id="draw_hline"><a href='../../plotcli/html/Canvas.html#method-Canvas-draw_hline'><code>plotcli::Canvas$draw_hline()</code></a></span></li>
|
|
48
|
+
<li><span class="pkg-link" data-pkg="plotcli" data-topic="Canvas" data-id="draw_line"><a href='../../plotcli/html/Canvas.html#method-Canvas-draw_line'><code>plotcli::Canvas$draw_line()</code></a></span></li>
|
|
49
|
+
<li><span class="pkg-link" data-pkg="plotcli" data-topic="Canvas" data-id="draw_points"><a href='../../plotcli/html/Canvas.html#method-Canvas-draw_points'><code>plotcli::Canvas$draw_points()</code></a></span></li>
|
|
50
|
+
<li><span class="pkg-link" data-pkg="plotcli" data-topic="Canvas" data-id="draw_polygon"><a href='../../plotcli/html/Canvas.html#method-Canvas-draw_polygon'><code>plotcli::Canvas$draw_polygon()</code></a></span></li>
|
|
51
|
+
<li><span class="pkg-link" data-pkg="plotcli" data-topic="Canvas" data-id="draw_polyline"><a href='../../plotcli/html/Canvas.html#method-Canvas-draw_polyline'><code>plotcli::Canvas$draw_polyline()</code></a></span></li>
|
|
52
|
+
<li><span class="pkg-link" data-pkg="plotcli" data-topic="Canvas" data-id="draw_rect"><a href='../../plotcli/html/Canvas.html#method-Canvas-draw_rect'><code>plotcli::Canvas$draw_rect()</code></a></span></li>
|
|
53
|
+
<li><span class="pkg-link" data-pkg="plotcli" data-topic="Canvas" data-id="draw_segment"><a href='../../plotcli/html/Canvas.html#method-Canvas-draw_segment'><code>plotcli::Canvas$draw_segment()</code></a></span></li>
|
|
54
|
+
<li><span class="pkg-link" data-pkg="plotcli" data-topic="Canvas" data-id="draw_text"><a href='../../plotcli/html/Canvas.html#method-Canvas-draw_text'><code>plotcli::Canvas$draw_text()</code></a></span></li>
|
|
55
|
+
<li><span class="pkg-link" data-pkg="plotcli" data-topic="Canvas" data-id="draw_vline"><a href='../../plotcli/html/Canvas.html#method-Canvas-draw_vline'><code>plotcli::Canvas$draw_vline()</code></a></span></li>
|
|
56
|
+
<li><span class="pkg-link" data-pkg="plotcli" data-topic="Canvas" data-id="fill_area"><a href='../../plotcli/html/Canvas.html#method-Canvas-fill_area'><code>plotcli::Canvas$fill_area()</code></a></span></li>
|
|
57
|
+
<li><span class="pkg-link" data-pkg="plotcli" data-topic="Canvas" data-id="fill_bar"><a href='../../plotcli/html/Canvas.html#method-Canvas-fill_bar'><code>plotcli::Canvas$fill_bar()</code></a></span></li>
|
|
58
|
+
<li><span class="pkg-link" data-pkg="plotcli" data-topic="Canvas" data-id="fill_circle"><a href='../../plotcli/html/Canvas.html#method-Canvas-fill_circle'><code>plotcli::Canvas$fill_circle()</code></a></span></li>
|
|
59
|
+
<li><span class="pkg-link" data-pkg="plotcli" data-topic="Canvas" data-id="fill_rect"><a href='../../plotcli/html/Canvas.html#method-Canvas-fill_rect'><code>plotcli::Canvas$fill_rect()</code></a></span></li>
|
|
60
|
+
<li><span class="pkg-link" data-pkg="plotcli" data-topic="Canvas" data-id="print"><a href='../../plotcli/html/Canvas.html#method-Canvas-print'><code>plotcli::Canvas$print()</code></a></span></li>
|
|
61
|
+
<li><span class="pkg-link" data-pkg="plotcli" data-topic="Canvas" data-id="render"><a href='../../plotcli/html/Canvas.html#method-Canvas-render'><code>plotcli::Canvas$render()</code></a></span></li>
|
|
62
|
+
</ul>
|
|
63
|
+
</details>
|
|
64
|
+
}}
|
|
65
|
+
\if{html}{\out{<hr>}}
|
|
66
|
+
\if{html}{\out{<a id="method-BlockCanvas-new"></a>}}
|
|
67
|
+
\if{latex}{\out{\hypertarget{method-BlockCanvas-new}{}}}
|
|
68
|
+
\subsection{Method \code{new()}}{
|
|
69
|
+
Initialize Block canvas
|
|
70
|
+
\subsection{Usage}{
|
|
71
|
+
\if{html}{\out{<div class="r">}}\preformatted{BlockCanvas$new(width, height)}\if{html}{\out{</div>}}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
\subsection{Arguments}{
|
|
75
|
+
\if{html}{\out{<div class="arguments">}}
|
|
76
|
+
\describe{
|
|
77
|
+
\item{\code{width}}{Character width}
|
|
78
|
+
|
|
79
|
+
\item{\code{height}}{Character height}
|
|
80
|
+
}
|
|
81
|
+
\if{html}{\out{</div>}}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
\if{html}{\out{<hr>}}
|
|
85
|
+
\if{html}{\out{<a id="method-BlockCanvas-set_pixel"></a>}}
|
|
86
|
+
\if{latex}{\out{\hypertarget{method-BlockCanvas-set_pixel}{}}}
|
|
87
|
+
\subsection{Method \code{set_pixel()}}{
|
|
88
|
+
Set a pixel in Block space
|
|
89
|
+
\subsection{Usage}{
|
|
90
|
+
\if{html}{\out{<div class="r">}}\preformatted{BlockCanvas$set_pixel(x, y, color = NULL)}\if{html}{\out{</div>}}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
\subsection{Arguments}{
|
|
94
|
+
\if{html}{\out{<div class="arguments">}}
|
|
95
|
+
\describe{
|
|
96
|
+
\item{\code{x}}{X coordinate (1-based, in pixel space: 1 to width)}
|
|
97
|
+
|
|
98
|
+
\item{\code{y}}{Y coordinate (1-based, in pixel space: 1 to height*2, 1 = top)}
|
|
99
|
+
|
|
100
|
+
\item{\code{color}}{Optional color name}
|
|
101
|
+
}
|
|
102
|
+
\if{html}{\out{</div>}}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
\if{html}{\out{<hr>}}
|
|
106
|
+
\if{html}{\out{<a id="method-BlockCanvas-clear"></a>}}
|
|
107
|
+
\if{latex}{\out{\hypertarget{method-BlockCanvas-clear}{}}}
|
|
108
|
+
\subsection{Method \code{clear()}}{
|
|
109
|
+
Clear the canvas
|
|
110
|
+
\subsection{Usage}{
|
|
111
|
+
\if{html}{\out{<div class="r">}}\preformatted{BlockCanvas$clear()}\if{html}{\out{</div>}}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
}
|
|
115
|
+
\if{html}{\out{<hr>}}
|
|
116
|
+
\if{html}{\out{<a id="method-BlockCanvas-clone"></a>}}
|
|
117
|
+
\if{latex}{\out{\hypertarget{method-BlockCanvas-clone}{}}}
|
|
118
|
+
\subsection{Method \code{clone()}}{
|
|
119
|
+
The objects of this class are cloneable with this method.
|
|
120
|
+
\subsection{Usage}{
|
|
121
|
+
\if{html}{\out{<div class="r">}}\preformatted{BlockCanvas$clone(deep = FALSE)}\if{html}{\out{</div>}}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
\subsection{Arguments}{
|
|
125
|
+
\if{html}{\out{<div class="arguments">}}
|
|
126
|
+
\describe{
|
|
127
|
+
\item{\code{deep}}{Whether to make a deep clone.}
|
|
128
|
+
}
|
|
129
|
+
\if{html}{\out{</div>}}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
% Generated by roxygen2: do not edit by hand
|
|
2
|
+
% Please edit documentation in R/canvas.r
|
|
3
|
+
\name{BrailleCanvas}
|
|
4
|
+
\alias{BrailleCanvas}
|
|
5
|
+
\title{Braille Canvas Class}
|
|
6
|
+
\description{
|
|
7
|
+
Braille Canvas Class
|
|
8
|
+
|
|
9
|
+
Braille Canvas Class
|
|
10
|
+
}
|
|
11
|
+
\details{
|
|
12
|
+
High-resolution canvas using Unicode Braille patterns.
|
|
13
|
+
Resolution: 2x4 (2 horizontal, 4 vertical dots per character = 8x resolution)
|
|
14
|
+
|
|
15
|
+
Braille dot layout (dot numbers and bit values):
|
|
16
|
+
\preformatted{
|
|
17
|
+
Col 0 Col 1 Bit values
|
|
18
|
+
Row 0: 1 4 0x01 0x08
|
|
19
|
+
Row 1: 2 5 0x02 0x10
|
|
20
|
+
Row 2: 3 6 0x04 0x20
|
|
21
|
+
Row 3: 7 8 0x40 0x80
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
\section{Super class}{
|
|
25
|
+
\code{\link[plotcli:Canvas]{plotcli::Canvas}} -> \code{BrailleCanvas}
|
|
26
|
+
}
|
|
27
|
+
\section{Public fields}{
|
|
28
|
+
\if{html}{\out{<div class="r6-fields">}}
|
|
29
|
+
\describe{
|
|
30
|
+
\item{\code{braille_base}}{Unicode code point for empty Braille character}
|
|
31
|
+
}
|
|
32
|
+
\if{html}{\out{</div>}}
|
|
33
|
+
}
|
|
34
|
+
\section{Methods}{
|
|
35
|
+
\subsection{Public methods}{
|
|
36
|
+
\itemize{
|
|
37
|
+
\item \href{#method-BrailleCanvas-new}{\code{BrailleCanvas$new()}}
|
|
38
|
+
\item \href{#method-BrailleCanvas-get_dot_bit}{\code{BrailleCanvas$get_dot_bit()}}
|
|
39
|
+
\item \href{#method-BrailleCanvas-set_pixel}{\code{BrailleCanvas$set_pixel()}}
|
|
40
|
+
\item \href{#method-BrailleCanvas-clone}{\code{BrailleCanvas$clone()}}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
\if{html}{\out{
|
|
44
|
+
<details><summary>Inherited methods</summary>
|
|
45
|
+
<ul>
|
|
46
|
+
<li><span class="pkg-link" data-pkg="plotcli" data-topic="Canvas" data-id="apply_colors"><a href='../../plotcli/html/Canvas.html#method-Canvas-apply_colors'><code>plotcli::Canvas$apply_colors()</code></a></span></li>
|
|
47
|
+
<li><span class="pkg-link" data-pkg="plotcli" data-topic="Canvas" data-id="clear"><a href='../../plotcli/html/Canvas.html#method-Canvas-clear'><code>plotcli::Canvas$clear()</code></a></span></li>
|
|
48
|
+
<li><span class="pkg-link" data-pkg="plotcli" data-topic="Canvas" data-id="draw_circle"><a href='../../plotcli/html/Canvas.html#method-Canvas-draw_circle'><code>plotcli::Canvas$draw_circle()</code></a></span></li>
|
|
49
|
+
<li><span class="pkg-link" data-pkg="plotcli" data-topic="Canvas" data-id="draw_hline"><a href='../../plotcli/html/Canvas.html#method-Canvas-draw_hline'><code>plotcli::Canvas$draw_hline()</code></a></span></li>
|
|
50
|
+
<li><span class="pkg-link" data-pkg="plotcli" data-topic="Canvas" data-id="draw_line"><a href='../../plotcli/html/Canvas.html#method-Canvas-draw_line'><code>plotcli::Canvas$draw_line()</code></a></span></li>
|
|
51
|
+
<li><span class="pkg-link" data-pkg="plotcli" data-topic="Canvas" data-id="draw_points"><a href='../../plotcli/html/Canvas.html#method-Canvas-draw_points'><code>plotcli::Canvas$draw_points()</code></a></span></li>
|
|
52
|
+
<li><span class="pkg-link" data-pkg="plotcli" data-topic="Canvas" data-id="draw_polygon"><a href='../../plotcli/html/Canvas.html#method-Canvas-draw_polygon'><code>plotcli::Canvas$draw_polygon()</code></a></span></li>
|
|
53
|
+
<li><span class="pkg-link" data-pkg="plotcli" data-topic="Canvas" data-id="draw_polyline"><a href='../../plotcli/html/Canvas.html#method-Canvas-draw_polyline'><code>plotcli::Canvas$draw_polyline()</code></a></span></li>
|
|
54
|
+
<li><span class="pkg-link" data-pkg="plotcli" data-topic="Canvas" data-id="draw_rect"><a href='../../plotcli/html/Canvas.html#method-Canvas-draw_rect'><code>plotcli::Canvas$draw_rect()</code></a></span></li>
|
|
55
|
+
<li><span class="pkg-link" data-pkg="plotcli" data-topic="Canvas" data-id="draw_segment"><a href='../../plotcli/html/Canvas.html#method-Canvas-draw_segment'><code>plotcli::Canvas$draw_segment()</code></a></span></li>
|
|
56
|
+
<li><span class="pkg-link" data-pkg="plotcli" data-topic="Canvas" data-id="draw_text"><a href='../../plotcli/html/Canvas.html#method-Canvas-draw_text'><code>plotcli::Canvas$draw_text()</code></a></span></li>
|
|
57
|
+
<li><span class="pkg-link" data-pkg="plotcli" data-topic="Canvas" data-id="draw_vline"><a href='../../plotcli/html/Canvas.html#method-Canvas-draw_vline'><code>plotcli::Canvas$draw_vline()</code></a></span></li>
|
|
58
|
+
<li><span class="pkg-link" data-pkg="plotcli" data-topic="Canvas" data-id="fill_area"><a href='../../plotcli/html/Canvas.html#method-Canvas-fill_area'><code>plotcli::Canvas$fill_area()</code></a></span></li>
|
|
59
|
+
<li><span class="pkg-link" data-pkg="plotcli" data-topic="Canvas" data-id="fill_bar"><a href='../../plotcli/html/Canvas.html#method-Canvas-fill_bar'><code>plotcli::Canvas$fill_bar()</code></a></span></li>
|
|
60
|
+
<li><span class="pkg-link" data-pkg="plotcli" data-topic="Canvas" data-id="fill_circle"><a href='../../plotcli/html/Canvas.html#method-Canvas-fill_circle'><code>plotcli::Canvas$fill_circle()</code></a></span></li>
|
|
61
|
+
<li><span class="pkg-link" data-pkg="plotcli" data-topic="Canvas" data-id="fill_rect"><a href='../../plotcli/html/Canvas.html#method-Canvas-fill_rect'><code>plotcli::Canvas$fill_rect()</code></a></span></li>
|
|
62
|
+
<li><span class="pkg-link" data-pkg="plotcli" data-topic="Canvas" data-id="print"><a href='../../plotcli/html/Canvas.html#method-Canvas-print'><code>plotcli::Canvas$print()</code></a></span></li>
|
|
63
|
+
<li><span class="pkg-link" data-pkg="plotcli" data-topic="Canvas" data-id="render"><a href='../../plotcli/html/Canvas.html#method-Canvas-render'><code>plotcli::Canvas$render()</code></a></span></li>
|
|
64
|
+
</ul>
|
|
65
|
+
</details>
|
|
66
|
+
}}
|
|
67
|
+
\if{html}{\out{<hr>}}
|
|
68
|
+
\if{html}{\out{<a id="method-BrailleCanvas-new"></a>}}
|
|
69
|
+
\if{latex}{\out{\hypertarget{method-BrailleCanvas-new}{}}}
|
|
70
|
+
\subsection{Method \code{new()}}{
|
|
71
|
+
Initialize Braille canvas
|
|
72
|
+
\subsection{Usage}{
|
|
73
|
+
\if{html}{\out{<div class="r">}}\preformatted{BrailleCanvas$new(width, height)}\if{html}{\out{</div>}}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
\subsection{Arguments}{
|
|
77
|
+
\if{html}{\out{<div class="arguments">}}
|
|
78
|
+
\describe{
|
|
79
|
+
\item{\code{width}}{Character width}
|
|
80
|
+
|
|
81
|
+
\item{\code{height}}{Character height}
|
|
82
|
+
}
|
|
83
|
+
\if{html}{\out{</div>}}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
\if{html}{\out{<hr>}}
|
|
87
|
+
\if{html}{\out{<a id="method-BrailleCanvas-get_dot_bit"></a>}}
|
|
88
|
+
\if{latex}{\out{\hypertarget{method-BrailleCanvas-get_dot_bit}{}}}
|
|
89
|
+
\subsection{Method \code{get_dot_bit()}}{
|
|
90
|
+
Get the bit value for a dot position
|
|
91
|
+
\subsection{Usage}{
|
|
92
|
+
\if{html}{\out{<div class="r">}}\preformatted{BrailleCanvas$get_dot_bit(dot_row, dot_col)}\if{html}{\out{</div>}}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
\subsection{Arguments}{
|
|
96
|
+
\if{html}{\out{<div class="arguments">}}
|
|
97
|
+
\describe{
|
|
98
|
+
\item{\code{dot_row}}{Row within Braille cell (0-3)}
|
|
99
|
+
|
|
100
|
+
\item{\code{dot_col}}{Column within Braille cell (0-1)}
|
|
101
|
+
}
|
|
102
|
+
\if{html}{\out{</div>}}
|
|
103
|
+
}
|
|
104
|
+
\subsection{Returns}{
|
|
105
|
+
Bit value
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
\if{html}{\out{<hr>}}
|
|
109
|
+
\if{html}{\out{<a id="method-BrailleCanvas-set_pixel"></a>}}
|
|
110
|
+
\if{latex}{\out{\hypertarget{method-BrailleCanvas-set_pixel}{}}}
|
|
111
|
+
\subsection{Method \code{set_pixel()}}{
|
|
112
|
+
Set a pixel in Braille space
|
|
113
|
+
\subsection{Usage}{
|
|
114
|
+
\if{html}{\out{<div class="r">}}\preformatted{BrailleCanvas$set_pixel(x, y, color = NULL)}\if{html}{\out{</div>}}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
\subsection{Arguments}{
|
|
118
|
+
\if{html}{\out{<div class="arguments">}}
|
|
119
|
+
\describe{
|
|
120
|
+
\item{\code{x}}{X coordinate (1-based, in pixel space: 1 to width*2)}
|
|
121
|
+
|
|
122
|
+
\item{\code{y}}{Y coordinate (1-based, in pixel space: 1 to height*4, 1 = top)}
|
|
123
|
+
|
|
124
|
+
\item{\code{color}}{Optional color name}
|
|
125
|
+
}
|
|
126
|
+
\if{html}{\out{</div>}}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
\if{html}{\out{<hr>}}
|
|
130
|
+
\if{html}{\out{<a id="method-BrailleCanvas-clone"></a>}}
|
|
131
|
+
\if{latex}{\out{\hypertarget{method-BrailleCanvas-clone}{}}}
|
|
132
|
+
\subsection{Method \code{clone()}}{
|
|
133
|
+
The objects of this class are cloneable with this method.
|
|
134
|
+
\subsection{Usage}{
|
|
135
|
+
\if{html}{\out{<div class="r">}}\preformatted{BrailleCanvas$clone(deep = FALSE)}\if{html}{\out{</div>}}
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
\subsection{Arguments}{
|
|
139
|
+
\if{html}{\out{<div class="arguments">}}
|
|
140
|
+
\describe{
|
|
141
|
+
\item{\code{deep}}{Whether to make a deep clone.}
|
|
142
|
+
}
|
|
143
|
+
\if{html}{\out{</div>}}
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}
|