-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfluvgeoRp.qmd
More file actions
39 lines (30 loc) · 1.09 KB
/
fluvgeoRp.qmd
File metadata and controls
39 lines (30 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
---
title: "fluvgeoRp"
format: html
---
```{r}
library(hexSticker)
library(magick)
```
```{r}
library(showtext)
## Loading Google fonts (http://www.google.com/fonts)
sysfonts::font_add_google(name = "Just Another Hand", family = "Just Another Hand")
## Automatically use showtext to render text for future devices
showtext::showtext_auto()
library(sysfonts)
library(showtextdb)
```
```{r}
fc_rat_hex_image <- "images/fluvgeo3.png"
filename <- "FG_hexes/fluvgeo3.png"
fuzz <- 30
p <- image_read(filename)
pp <- p %>%
image_fill(color = "transparent", refcolor = "white", fuzz = fuzz, point = "+1+1") %>%
image_fill(color = "transparent", refcolor = "white", fuzz = fuzz, point = paste0("+", image_info(p)$width-1, "+1")) %>%
image_fill(color = "transparent", refcolor = "white", fuzz = fuzz, point = paste0("+1", "+", image_info(p)$height-1)) %>%
image_fill(color = "transparent", refcolor = "white", fuzz = fuzz, point = paste0("+", image_info(p)$width-1, "+", image_info(p)$height-1))
image_write(image = pp, path = "FG_hexes/fluvgeo3.png")
file.show("fluvgeo3.png")
```