SimplifyShape

data class SimplifyShape(val keepFraction: Float) : DrawEvent

Cuts the selected (or edited) polygon or polyline down to about keepFraction of its vertices, as one undo step: the least important points go first (see Visvalingam), the kept ones are original vertices, and a polygon keeps at least 3 and a polyline 2. Ignored if no such shape is selected or nothing would be removed. Heavy reductions of a detailed shape can make its outline cross itself, so a host should not offer to go all the way down.

Constructors

Link copied to clipboard
constructor(keepFraction: Float)

Properties

Link copied to clipboard