Learn R Programming

ggsketch (version 2.0.0)

curve_fill: Flatten a closed Bezier boundary to a polygon, then fill

Description

For area/ribbon/density geoms: converts a curved boundary (list of Bezier control-point sets) into a polygon approximation, then applies sketch_fill.

Usage

curve_fill(bezier_list, tol = 0.001, rdp_eps = 1e-04, ...)

Value

List of fill-line segments (same structure as sketch_fill).

Arguments

bezier_list

List of 4-element lists, each with P0, P1, P2, P3 (each a length-2 c(x,y) vector in inch space). The list describes a closed path.

tol

Flatness tolerance for flattening. Default 1e-3.

rdp_eps

RDP epsilon. Default 1e-4.

...

Passed to sketch_fill.

See Also

Other sketch-core: arrowhead(), engrave_fill(), engrave_ladder(), hachure_fill(), hachure_fill_multi(), leader_path(), repel_layout(), rough_arc(), rough_bezier(), rough_ellipse(), roughen_polyline(), sketch_arrowheads(), sketch_fill(), sketch_fill_multi(), spray_scatter(), stroke_profile(), stroke_ribbon(), treemap_layout(), wash_bleed(), watercolor_wash(), watercolor_wash_multi()