Skip to content

Commit 9d48e61

Browse files
author
Bohdan Trofymchuk
committed
fixes
1 parent c33c7dc commit 9d48e61

File tree

2 files changed

+1
-17
lines changed

2 files changed

+1
-17
lines changed

nimx/types.nim

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -140,18 +140,6 @@ proc centerInRect*(s: Size, r: Rect): Point =
140140
result.x = r.origin.x + (r.width - s.width) / 2
141141
result.y = r.origin.y + (r.height - s.height) / 2
142142

143-
proc left*(r: Rect): Coord =
144-
result = r.origin.x
145-
146-
proc right*(r: Rect): Coord =
147-
result = r.origin.x + r.size.width
148-
149-
proc top*(r: Rect): Coord =
150-
result = r.origin.y
151-
152-
proc bottom*(r: Rect): Coord =
153-
result = r.origin.y + r.size.height
154-
155143
proc intersect*(r: Rect, c: Rect): bool =
156-
if r.left < c.right and c.left < r.right and r.top < c.bottom and c.top < r.bottom:
144+
if r.minX < c.maxX and c.minX < r.maxX and r.minY < c.maxY and c.minY < r.maxY:
157145
result = true

nimx/view.nim

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,3 @@ proc isDescendantOf*(subView, superview: View): bool =
254254
if vi == superview:
255255
return true
256256
vi = vi.superview
257-
258-
method translate*(v: View, p : Point) {.base.} =
259-
v.frame.origin.x += p.x
260-
v.frame.origin.y += p.y

0 commit comments

Comments
 (0)