aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2023-06-26 17:04:39 +0200
committerbptato <nincsnevem662@gmail.com>2023-06-26 17:04:39 +0200
commitc6c29fb83d08bfd56631872643618c5ba76455e8 (patch)
treeef494a2fb95329a48dcdd4aef22463093222942a
parent4d34f50d74b2b9c7ba2269f087018ee07334c16a (diff)
downloadchawan-c6c29fb83d08bfd56631872643618c5ba76455e8.tar.gz
Move CanvasFillRule from bitmap to painter
-rw-r--r--src/img/bitmap.nim4
-rw-r--r--src/img/painter.nim4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/img/bitmap.nim b/src/img/bitmap.nim
index 54f17ff5..064e574d 100644
--- a/src/img/bitmap.nim
+++ b/src/img/bitmap.nim
@@ -1,10 +1,6 @@
import types/color
type
- CanvasFillRule* = enum
- NON_ZERO = "nonzero"
- EVEN_ODD = "evenodd"
-
Bitmap* = ref object of RootObj
px*: seq[RGBAColor]
width*: uint64
diff --git a/src/img/painter.nim b/src/img/painter.nim
index c4aef549..8296b744 100644
--- a/src/img/painter.nim
+++ b/src/img/painter.nim
@@ -9,6 +9,10 @@ import types/color
import types/line
import types/vector
+type CanvasFillRule* = enum
+ NON_ZERO = "nonzero"
+ EVEN_ODD = "evenodd"
+
# https://en.wikipedia.org/wiki/Bresenham's_line_algorithm#All_cases
proc plotLineLow(bmp: Bitmap, x0, y0, x1, y1: int64, color: RGBAColor) =
var dx = x1 - x0