Skip to content

Commit 674b6d0

Browse files
committed
migrate to grob utilities
1 parent a8306d3 commit 674b6d0

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

DESCRIPTION

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,6 @@ Collate:
173173
'ggplot2-package.R'
174174
'grob-absolute.R'
175175
'grob-dotstack.R'
176-
'grob-null.R'
177176
'grouping.R'
178177
'theme-elements.R'
179178
'guide-.R'

R/grob-null.R

Lines changed: 0 additions & 10 deletions
This file was deleted.

R/utilities-grid.R

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,17 @@ gg_par <- function(..., stroke = NULL, pointsize = NULL) {
4848
inject(gpar(!!!args))
4949
}
5050

51+
#' The zero grob draws nothing and has zero size.
52+
#'
53+
#' @keywords internal
54+
#' @export
55+
zeroGrob <- function() .zeroGrob
56+
57+
.zeroGrob <- NULL
58+
on_load(.zeroGrob <- add_class(nullGrob(), "zeroGrob"))
59+
60+
is.zero <- function(x) is.null(x) || inherits(x, "null")
61+
5162
width_cm <- function(x) {
5263
if (is.grob(x)) {
5364
convertWidth(grobWidth(x), "cm", TRUE)

man/zeroGrob.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)