This commit is contained in:
Ryan Oldenburg 2022-06-06 14:31:50 -05:00
parent 9095e6e4bc
commit b3999b0598

View file

@ -63,7 +63,7 @@ proc dataIndex*(image: Image, x, y: int): int {.inline, raises: [].} =
template unsafe*(src: Image): UnsafeImage =
cast[UnsafeImage](src)
template `[]`*(view: UnsafeImage, x, y: int): ColorRGBX =
template `[]`*(view: UnsafeImage, x, y: int): var ColorRGBX =
## Gets a color from (x, y) coordinates.
## * No bounds checking *
## Make sure that x, y are in bounds.