@@ -321,7 +321,11 @@ geom_sf_label <- function(mapping = aes(), data = NULL,
321
321
nudge_y = 0 ,
322
322
label.padding = unit(0.25 , " lines" ),
323
323
label.r = unit(0.15 , " lines" ),
324
- label.size = 0.25 ,
324
+ label.size = deprecated(),
325
+ border.colour = NULL ,
326
+ border.color = NULL ,
327
+ text.colour = NULL ,
328
+ text.color = NULL ,
325
329
na.rm = FALSE ,
326
330
show.legend = NA ,
327
331
inherit.aes = TRUE ,
@@ -338,6 +342,12 @@ geom_sf_label <- function(mapping = aes(), data = NULL,
338
342
position <- position_nudge(nudge_x , nudge_y )
339
343
}
340
344
345
+ extra_args <- list2(... )
346
+ if (lifecycle :: is_present(label.size )) {
347
+ deprecate_warn0(" 3.5.0" , " geom_label(label.size)" , " geom_label(linewidth)" )
348
+ extra_args $ linewidth <- extra_args $ linewidth %|| % label.size
349
+ }
350
+
341
351
layer_sf(
342
352
data = data ,
343
353
mapping = mapping ,
@@ -350,10 +360,11 @@ geom_sf_label <- function(mapping = aes(), data = NULL,
350
360
parse = parse ,
351
361
label.padding = label.padding ,
352
362
label.r = label.r ,
353
- label.size = label.size ,
354
363
na.rm = na.rm ,
355
364
fun.geometry = fun.geometry ,
356
- ...
365
+ border.colour = border.color %|| % border.colour ,
366
+ text.colour = text.color %|| % text.colour ,
367
+ !!! extra_args
357
368
)
358
369
)
359
370
}
0 commit comments