Learn R Programming

ggpattern (version 0.1.3)

convert_polygon_df_to_alpha_channel: Convert a polygon to an alpha mask

Description

Alpha values of 1 correspond to pixels within the polygon, all other values will be zero.

Usage

convert_polygon_df_to_alpha_channel(polygon_df, width, height)

Arguments

polygon_df

polygon_df object

width, height

dimensions of the alpha channel matrix to return

Value

numeric matrix with all values with 0 or 1