CRdraw_text | R Documentation |
Draws text to rendering target, upper-left corner of text specified in point_list, using font loaded with CRload_font
.
CRdraw_text( graphics_list, font_list, index, text, point_list, wrap_length = NULL, status = NULL)
graphics_list |
List containing pointers to window, renderer etc. created with |
font_list |
List of fonts loaded with |
index |
Index into font_list, specifying which font to use. |
text |
Character vector specifying text to be drawn. |
point_list |
List defining upper_left corner of text, containing elements x and y. |
wrap_length |
After how many pixels should text be wrapped? Wrapping happens at spaces. Leave wrap_length at default (NULL) for single-line, non-wrapped rendering of text. |
status |
Optional list |
fnt_list <- CRload_font(list(), "C:/Documents/myfont.ttf", 20)
CRset_render_color(gs, list(r = 0, g = 0, b = 0))
CRrender_clear(gs)
CRset_render_color(gs, list(r = 100, g = 0, b = 0))
CRdraw_text(gs, fnt_list, 1, "HELLO!", list(x = 100, y = 100))
CRrender_present(gs)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.