<div dir="ltr"><div>Usually when code figures out the extents, it also has a side effect of making sure the points are in a particular order. This is due to it using min() for one corner and max() for the opposite corner. So I think in this case it is safe to say the points will be in this order.<br><br></div>Generally most code in Cairo and other places treat negative width/height as empty rectangles, not inverted ones. In most cases this makes the code simpler.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Dec 19, 2015 at 10:13 AM, Enrico Weigelt, metux IT consult <span dir="ltr"><<a href="mailto:enrico.weigelt@gr13.net" target="_blank">enrico.weigelt@gr13.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 19.12.2015 11:11, Uli Schlachter wrote:<br>
<br>
> I don't really know, but I wonder: Why would the points be the other ><br>
way around? I guess path->extents.p1 is defined to be the north west<br>
> corner and it can only be south or east of p2 due to rounding issues<br>
> somewhere?<br>
<br>
</span>It that really the case ? Can we be sure about that ?<br>
(honestly, I have no idea :()<br>
<span class=""><br>
> So based on a definition of "p1 is the north-west corner", I think this function<br>
> does exactly the right thing. If this every is a problem, the code generating<br>
> this bogus extents should be fixed.<br>
<br>
</span>Okay, do have that definition scribed in stone ? If not, should we do<br>
that ?<br>
<br>
I agree that such an definition might be helpful, but there *might* be<br>
cases where it's turned around. How can we detect those cases (and<br>
find the responsible code) w/o too much overhead ? Maybe some<br>
assert()'s.<br>
<br>
--mtx<br>
<br>
--<br>
Enrico Weigelt,<br>
metux IT consulting<br>
<a href="tel:%2B49-151-27565287" value="+4915127565287">+49-151-27565287</a><br>
<div class="HOEnZb"><div class="h5">--<br>
cairo mailing list<br>
<a href="mailto:cairo@cairographics.org">cairo@cairographics.org</a><br>
<a href="http://lists.cairographics.org/mailman/listinfo/cairo" rel="noreferrer" target="_blank">http://lists.cairographics.org/mailman/listinfo/cairo</a></div></div></blockquote></div><br></div>