modify_usgs_pattern: Change the attributes of a pattern

Description Usage Arguments Details Value

View source: R/utils-usgs.R

Description

This function uses hand-crafted regular expressions to replace certain strings in the given SVG with the values given as arguments.

Usage

1
2
3
4
5
6
7
8
modify_usgs_pattern(
  pattern,
  width,
  alpha = 1,
  fill = "#ffffff",
  angle = 0,
  height = width
)

Arguments

pattern

svg text

width, height

size in pixels

alpha

opacity. default: 1. (opaque)

fill

default: '#ffffff'

angle

angle in degrees

Details

This only really works because the SVG text that the USGS was derived from was relatively regular in layout/naming.

Value

adjusted svg text


coolbutuseless/svgpatternusgs documentation built on Feb. 2, 2020, 12:05 a.m.