<div dir="ltr">Indeed, the issue is solved as of 1.15.6 (it also appears that picking a very small line width does not cause it to be taken as zero anymore (a change that I'm also happy with)).<br><div>Thanks!</div><div>Antony</div></div><div class="gmail_extra"><br><div class="gmail_quote">2017-07-06 2:32 GMT-07:00 Adrian Johnson <span dir="ltr"><<a href="mailto:ajohnson@redneon.com" target="_blank">ajohnson@redneon.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Have you tried the latest snapshot (1.15.6)? 1.15.4 and later contains<br>
fixes for recording surfaces with negative extents.<br>
<div class="HOEnZb"><div class="h5"><br>
On 06/07/17 16:58, Antony Lee wrote:<br>
> Hi all,<br>
><br>
> I have am a bit puzzled with how negative coordinates interact with<br>
> recording surfaces.  Consider the following cairocffi example:<br>
><br>
>     from cairocffi import *<br>
>     surf = RecordingSurface(CONTENT_<wbr>COLOR_ALPHA, None)<br>
>     ctx = Context(surf)<br>
>     ctx.move_to(-5, -5)<br>
>     ctx.line_to(5, 5)<br>
>     ctx.set_line_width(.001)  # so that ink extents are not affected by<br>
>     linewidth<br>
>     ctx.stroke()<br>
>     print(surf.ink_extents())<br>
><br>
><br>
> This gives (-5.0, -5.0, 10.0, 10.0), so ink_extents has correctly<br>
> reported that we have something going from (-5, -5) to (5, 5) on the<br>
> unbounded surface.<br>
><br>
> But replace the surface constructor call by<br>
><br>
>     surf = RecordingSurface(CONTENT_<wbr>COLOR_ALPHA, (-10, -10, 20, 20))<br>
><br>
><br>
> which is a surface that is large enough to cover our line.  (After all,<br>
> the documentation encourages us to specify the extents, for better<br>
> performance.)<br>
> Now the same program gives (5.0, 5.0, 5.0, 5.0).  By playing around with<br>
> the numbers, I *guess* that the origin is relative to the lower left<br>
> corner of the recording surface, and the width and height are up to 0, 0<br>
> but not beyond?<br>
><br>
> Shouldn't I get instead either (-5.0, -5.0, 10.0, 10.0) (same as with an<br>
> unbounded surface), or at least (5.0, 5.0, 10.0, 10.0) (if the returned<br>
> extents are relative to the lower left corner of the surface)?<br>
><br>
> Thanks in advance,<br>
><br>
> Antony Lee<br>
><br>
><br>
<br>
</div></div></blockquote></div><br></div>