get_coords {consort}R 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)

[Package consort version 1.2.1 Index]