about summary refs log tree commit diff stats
path: root/src/html
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2024-04-26 21:03:25 +0200
committerbptato <nincsnevem662@gmail.com>2024-04-26 21:05:57 +0200
commit911c2dd13051b5c195c60264d07ff7ff6cccc664 (patch)
tree63ab17a0a4baf890aab4ac3f5a15da2876b2464d /src/html
parent39a0678199431bf6bfdcec79007f2ac794cab72c (diff)
downloadchawan-911c2dd13051b5c195c60264d07ff7ff6cccc664.tar.gz
color: RGBAColor -> ARGBColor
Diffstat (limited to 'src/html')
-rw-r--r--src/html/dom.nim10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/html/dom.nim b/src/html/dom.nim
index 76ed9b70..0c009b6b 100644
--- a/src/html/dom.nim
+++ b/src/html/dom.nim
@@ -326,8 +326,8 @@ type
     # CanvasTransform
     transformMatrix: Matrix
     # CanvasFillStrokeStyles
-    fillStyle: RGBAColor
-    strokeStyle: RGBAColor
+    fillStyle: ARGBColor
+    strokeStyle: ARGBColor
     # CanvasPathDrawingStyles
     lineWidth: float64
     # CanvasTextDrawingStyles
@@ -424,7 +424,7 @@ jsDestructor(CanvasRenderingContext2D)
 jsDestructor(TextMetrics)
 jsDestructor(CSSStyleDeclaration)
 
-proc parseColor(element: Element; s: string): RGBAColor
+proc parseColor(element: Element; s: string): ARGBColor
 
 proc resetTransform(state: var DrawingState) =
   state.transformMatrix = newIdentityMatrix(3)
@@ -2344,7 +2344,7 @@ isDefaultPassive = func (eventTarget: EventTarget): bool =
     EventTarget(node.document.html) == eventTarget or
     EventTarget(node.document.body) == eventTarget
 
-proc parseColor(element: Element; s: string): RGBAColor =
+proc parseColor(element: Element; s: string): ARGBColor =
   let cval = parseComponentValue(newStringStream(s))
   #TODO return element style
   # For now we just use white.
@@ -2357,7 +2357,7 @@ proc parseColor(element: Element; s: string): RGBAColor =
   let color = color0.get
   if color.t != ctRGB:
     return ec
-  return color.rgbacolor
+  return color.argbcolor
 
 #TODO ??
 func target0*(element: Element): string =