| 1 |
imgfile <- file.path(tempdir(), "logo.png") |
| 2 |
logo <- hexSticker::sticker( |
| 3 |
~ { |
| 4 |
par(mar = c(0,0,0,0)) |
| 5 |
plot(NA, xlim = c(0,1), ylim = c(-0.2,1.4), xlab = "", ylab = "", bty = "n", axes = FALSE) |
| 6 |
lines(x = c(1,1)*0.35, y = c(0,1), lwd = 10, lend = 0L, col = "white") |
| 7 |
lines(x = c(1,1)*0.65, y = c(0,1), lwd = 10, lend = 0L, col = "white") |
| 8 |
}, |
| 9 |
package="parallelly", |
| 10 |
p_size=20, s_x=0.8, s_y=0.6, |
| 11 |
s_width=1.4, s_height=1.2, |
| 12 |
h_color="#f39c12", |
| 13 |
filename=imgfile |
| 14 |
) |
| 15 |
|
| 16 |
img <- magick::image_read(imgfile) |
| 17 |
img2 <- magick::image_resize(img, geometry = c(120, 140)) |
| 18 |
magick::image_write(img2, "man/figures/logo.png") |
| 19 |
magick::image_write(img, "logo-large.png") |
| 20 |
|
| 21 |
|
| 22 |
|