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:
parent
2090379892
commit
4d39dcaded
|
@ -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
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue