Yes, I think it is a problem of reasonning as whole number of pixels Interval [ ) is for the case where (0@0 extent: 10@1) is exactly 10 pixels wide, and 1 pixel tall...
The mail I cited above is using Rectangle as an abstraction of horizontal/vertical line segment (zero-width), in which case [a a) must still intersects... That must be conflicting with redrawing surfaces for which [a a) must not... Nicolas 2013/2/14 Igor Stasenko <[email protected]>: > It is all about intervals.. > if you define a rectangle using pair of intervals (2-dimensional): > > [ a .. b ) > > then it contains all points between a and b, including a, but not including b > and therefore rectangles > [ a.. b ) and [b .. c ) (where c >b) do not intersect. > > if rectangle defined as pair of intervals: > > [ a .. b ] > > then it contains all points between a and b, including a AND b > and of course > [ a .. b ] and [b .. c ] (where c >b) will overlap. > > the problem is if you using [ ) intervals, then how you represent > degenerate (zero-width or zero-height) > rectangles.. > because interval [a .. a) holds a contradiction: it includes 'a', but > not includes 'a', which makes no sense. > > and then you have interesting questions, like do intervals > [a..a) and [a..b) overlap? > > While if using [a..a] there's no problem.. > [a..a] certainly overlaps with [a..b] > > But from other side, if we will use [...] intervals, then there is no > way to split interval to get two non-overlapping ones: > > [a..b] => [a..c] + [c..b] > (a<=c<=b) > > But i am not sure whether it will have significant impact or not. > > So, here my question: what interval type is better [) or [] ? > Existed implementation uses [) > > -- > Best regards, > Igor Stasenko. >
