Add an editable primitive to a logo
Usage
hex_add_part(
design,
type = c("circle", "rectangle", "line", "polygon"),
...,
fill = "#009E73",
col = "#FFFFFF",
lwd = 1,
alpha = 1
)Arguments
- design
A
hex_design()object.- type
circle,rectangle,line, orpolygon.- ...
Primitive geometry in normalised canvas coordinates:
x,y, andrfor circles;x,y,width,heightfor rectangles; numericxandyvectors for lines and polygons. Sensible centred defaults apply.- fill, col
Fill and outline colours, including
"transparent".- lwd
Outline width in points on the master canvas.
- alpha
Opacity between zero and one.
Examples
d <- logo_design("New project")
d <- hex_add_part(d, "circle", x = .5, y = .6, r = .15)
hex_layers(d)
#> id type fill col points role name visible
#> 1 layer_0001 polygon #191919 #000000 6 frame Frame TRUE
#> 2 layer_0002 pathgrob #FFFFFF <NA> 1260 name Name TRUE
#> 3 part_0001 circle #009E73 #FFFFFF 1 added Circle TRUE