gregjohnson2017 / tabula-editor

An image editor built from scratch with OpenGL in Go.
MIT License
7 stars 0 forks source link

Selection outline edge cases, not appearing #11

Open gregjohnson2017 opened 4 years ago

gregjohnson2017 commented 4 years ago

Selection outline not appearing on certain edges of the image (bottom and left?)

gregjohnson2017 commented 4 years ago

This bug happens because of our hacky way of making selection outlines more performant. It involves setting the viewport around the image so the coordinates of the lines don't need to be absolute, but rather relative to the image (and this helps because then the line coordinates don't need to be recomputed when the image is panned or zoomed). Because the viewport is tight around the image, and the lines have to be on one side of a texel (can't be sub-pixel), it just so happens to default to bottom and left. This means that on the left-most and bottom-most edges of the image, the viewport cuts off those lines.

Our current redesign might get rid of this problem