diff options
Diffstat (limited to 'src/layout/box.nim')
-rw-r--r-- | src/layout/box.nim | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/layout/box.nim b/src/layout/box.nim index 95c66fed..3a0e5ed4 100644 --- a/src/layout/box.nim +++ b/src/layout/box.nim @@ -125,6 +125,9 @@ func `h=`*(size: var Size; h: LayoutUnit) {.inline.} = func `+`*(a, b: Offset): Offset = return offset(x = a.x + b.x, y = a.y + b.y) +func `-`*(a, b: Offset): Offset = + return offset(x = a.x - b.x, y = a.y - b.y) + proc `+=`*(a: var Offset; b: Offset) = a.x += b.x a.y += b.y |