diff --git a/DESCRIPTION b/DESCRIPTION index d8b65a6..02cd3c7 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: gex Title: A Dependency-Light Hex-Logo Builder -Version: 0.2.0 +Version: 0.2.0.9000 Authors@R: person("Matt", "Dray", , "mwdray@gmail.com", role = c("aut", "cre")) Description: A simple interface to create hexagon-shaped logos that help diff --git a/NEWS.md b/NEWS.md index e73a96c..9327a95 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,7 @@ +# gex 0.2.0.9000 + +* Added hex logo for the package. + # gex 0.2.0 ## Breaking diff --git a/README.md b/README.md index c1b4561..b2b7aab 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,4 @@ - -# {gex} +# {gex} [![Project Status: Active – The project has reached a stable, usable state and is being actively developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active) diff --git a/data-raw/logo.R b/data-raw/logo.R new file mode 100644 index 0000000..7ac6076 --- /dev/null +++ b/data-raw/logo.R @@ -0,0 +1,40 @@ +# image via: +# https://pixabay.com/vectors/dragon-lizard-line-art-line-drawing-5660771/ +img_tmp <- tempfile(fileext = ".png") +magick::image_read("inst/images/lizard.png") |> + magick::image_fill("olivedrab1", fuzz = 100, refcolor = "black") |> + magick::image_write(img_tmp) +img <- png::readPNG(img_tmp) +write_path <- "man/figures/logo.png" +font <- "IBM Plex Serif" +gex::open_device(file_path = write_path) +gex::add_hex(col = "olivedrab4") +for (x in seq(-0.04, 1, 0.2)) { + for (y in seq(0, 1, 0.16)) { + gex::add_image(img, x, y, width = 0.3, angle = -30) + } +} +unlink(img_tmp) +x <- 0.52 +y <- 0.56 +gex::add_text( + string = "gex", + x = x + 0.01, + y = y - 0.01, + size = 60, + col = "olivedrab4", + family = font, + face = "italic" +) +gex::add_text( + string = "gex", + x = x, + y = y, + size = 60, + col = "olivedrab1", + family = font, + face = "italic" +) +gex::add_border(width = 0.05, col = "olivedrab1") +gex::close_device() +system(paste("open", write_path)) diff --git a/inst/images/lizard.png b/inst/images/lizard.png new file mode 100644 index 0000000..580dec5 Binary files /dev/null and b/inst/images/lizard.png differ diff --git a/man/figures/logo.png b/man/figures/logo.png new file mode 100644 index 0000000..f416aa3 Binary files /dev/null and b/man/figures/logo.png differ diff --git a/man/gex-package.Rd b/man/gex-package.Rd index 1cd29ee..939086c 100644 --- a/man/gex-package.Rd +++ b/man/gex-package.Rd @@ -6,6 +6,8 @@ \alias{gex-package} \title{gex: A Dependency-Light Hex-Logo Builder} \description{ +\if{html}{\figure{logo.png}{options: style='float: right' alt='logo' width='120'}} + A simple interface to create hexagon-shaped logos that help promote your R package or other projects. Uses the 'grid' system. } \seealso{