get_coords: Get the coordinates of the textbox object

View source: R/get_coords.R

get_coordsR Documentation

Get the coordinates of the textbox object

Description

This function will get the coordinates of the textbox object.

Usage

get_coords(x)

Arguments

x

A textbox object

Value

A list of coordinates will return:

left

Left (x-min) side coordinate.

right

Right (x-max) side coordinate.

bottom

Bottom (y-min) side coordinate.

top

Top (y-max) side coordinate.

top.mid

Coordinate vector of top middle, measured by grob.

left.mid

Coordinate vector of left middle, measured by grob.

bottom.mid

Coordinate vector of bottom middle, measured by grob.

right.mid

Coordinate vector of right middle, measured by grob.

x

X (center x) coordinate.

y

Y (center y) coordinate.

width

Width of the textbox, derived with grobWidth.

height

Height of the textbox, derived with grobHeight.

half_width

Half width of the box.

half_height

Half height of the box.

Examples

fg <- textbox(text = "This is a test")
get_coords(fg)

consort documentation built on Jan. 6, 2023, 1:20 a.m.