Commit Graph

4 Commits

Author SHA1 Message Date
Elias Naur 7299d1c875 op/clip: replace Rect and RoundRect with Rect type
Remembering the order of the corners in the RoundRect is difficult,
which suggest that RoundRect should be a struct with named fields.

Do that, and make Rect the special case where corner radii are all
zero.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-11-18 14:33:28 +01:00
Elias Naur 65c783179d clip: change Rect argument to f32.Rectangle
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-11-09 19:42:19 +01:00
Elias Naur 4f30b985eb op/clip: add RoundRect
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-11-09 19:30:07 +01:00
Elias Naur e864ac3fc3 op/clip: split clip operations into its own package
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-11-09 19:07:00 +01:00