Changed View:get_content_offset() to round resultant values
Avoids some issues that occur with fractional offsets, most noticable on rectangles drawn on DocView jittering by 1-pixel when scrolling
This commit is contained in:
+3
-1
@@ -111,7 +111,9 @@ end
|
||||
|
||||
|
||||
function View:get_content_offset()
|
||||
return self.position.x - self.scroll.x, self.position.y - self.scroll.y
|
||||
local x = common.round(self.position.x - self.scroll.x)
|
||||
local y = common.round(self.position.y - self.scroll.y)
|
||||
return x, y
|
||||
end
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user