From @orange-vertex on May 13, 2017 21:47
PointMap::pixelate is used to convert a point in continuous 2D space to a PixelRef (pixel reference). This function will, by default, constrain the return value to pixels within the grid unless explicitly told so by the caller (by providing constrain = false). The expected behaviour when "pixelating" would be to get indices of pixels even if those are not on the grid because the name implies a conversion from a continuous space to a discreet space and not a choice on a grid.
Possible solutions (by my order of preference):
- Change the default value of the "constrain" input value to false
- Remove bounds checking from the function and expect it to happen outside it
- Change the name of the function to "getPixelFromGrid" or something like that
Copied from original issue: blsemo#14
From @orange-vertex on May 13, 2017 21:47
PointMap::pixelate is used to convert a point in continuous 2D space to a PixelRef (pixel reference). This function will, by default, constrain the return value to pixels within the grid unless explicitly told so by the caller (by providing constrain = false). The expected behaviour when "pixelating" would be to get indices of pixels even if those are not on the grid because the name implies a conversion from a continuous space to a discreet space and not a choice on a grid.
Possible solutions (by my order of preference):
Copied from original issue: blsemo#14