blob: c047bf32a99df2f44fea397a2f41dda24e679a5d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
package clip
type options struct {
openBound bool
}
// An Option is a possible parameter to the clip operations.
type Option func(*options)
// OpenBound is an option to treat the bound as open. i.e. any lines
// along the bound sides will be removed and a point on boundary will
// cause the line to be split.
func OpenBound(yes bool) Option {
return func(o *options) {
o.openBound = yes
}
}
|