split_block: Split a block bounding box

Description Usage Arguments Value Examples

View source: R/process_output.R

Description

This function 'splits' (in the sense of changing the coordinates) of an existing block bounding box vertically or horizontally at a specified point. It takes a block data frame as input and modifies it. The splitting produces a new block, which is added to the data frame while the old block's coordinates are updated. The function returns a revised block data frame.

Usage

1
split_block(block_df, page = 1, block, cut_point, direction = "v")

Arguments

block_df

A dataframe generated by build_block_df().

page

The number of the page where the split will be made. Defaults to 1.

block

The number of the block to be split.

cut_point

A number between 0 and 100, where 0 is the existing left/top limit and 100 is the existing right/bottom limit.

direction

"V" for vertical split or "H" for horizontal split. Defaults to "V".

Value

a block data frame

Examples

1
2
3
4
## Not run: 
new_block_df <- split_block(df = old_block_df, block = 7, cut_point = 33)

## End(Not run)

daiR documentation built on June 11, 2021, 5:16 p.m.