| add_title {rayimage} | R Documentation |
Takes an RGB array/filename and adds a title with an optional titlebar.
add_title( image, title_text = "", title_offset = c(20, 20), title_color = "black", title_size = 30, title_font = "sans", title_style = "normal", title_bar_color = NULL, title_bar_alpha = 0.5, title_position = "northwest", filename = NULL, preview = FALSE )
image |
Image filename or 3-layer RGB array. |
title_text |
Default |
title_offset |
Default |
title_color |
Default |
title_size |
Default |
title_font |
Default |
title_style |
Default |
title_bar_color |
Default |
title_bar_alpha |
Default |
title_position |
Default |
filename |
Default |
preview |
Default |
3-layer RGB array of the processed image.
#Plot the dragon
add_title(dragon, preview = TRUE, title_text = "Dragon", title_size=20)
#That's hard to see--let's add a title bar:
add_title(dragon, preview = TRUE, title_text = "Dragon", title_size=20,
title_bar_color="white")
#Change the width of the bar:
add_title(dragon, preview = TRUE, title_text = "Dragon", title_size=20,
title_bar_color="white", title_offset = c(12,12))
#Change the color and title color:
add_title(dragon, preview = TRUE, title_text = "Dragon", title_size=20,
title_bar_color="red", title_color = "white", title_offset = c(12,12))
#Change the transparency:
add_title(dragon, preview = TRUE, title_text = "Dragon", title_size=20, title_bar_alpha = 0.8,
title_bar_color="red", title_color = "white", title_offset = c(12,12))