<div dir="ltr">Hi all,<div><br></div><div>I have am a bit puzzled with how negative coordinates interact with recording surfaces.  Consider the following cairocffi example:</div><div><br></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><div>from cairocffi import *</div></div><div><div>surf = RecordingSurface(CONTENT_COLOR_ALPHA, None)</div></div><div><div>ctx = Context(surf)</div></div><div><div>ctx.move_to(-5, -5)</div></div><div><div>ctx.line_to(5, 5)</div></div><div><div>ctx.set_line_width(.001)  # so that ink extents are not affected by linewidth</div></div><div><div>ctx.stroke()</div></div><div><div>print(surf.ink_extents())</div></div></blockquote><div><br></div><div>This gives (-5.0, -5.0, 10.0, 10.0), so ink_extents has correctly reported that we have something going from (-5, -5) to (5, 5) on the unbounded surface.</div><div><br></div><div>But replace the surface constructor call by</div><div><br></div><div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><div>surf = RecordingSurface(CONTENT_COLOR_ALPHA, (-10, -10, 20, 20))</div></div></blockquote><br></div><div>which is a surface that is large enough to cover our line.  (After all, the documentation encourages us to specify the extents, for better performance.)</div><div>Now the same program gives (5.0, 5.0, 5.0, 5.0).  By playing around with the numbers, I *guess* that the origin is relative to the lower left corner of the recording surface, and the width and height are up to 0, 0 but not beyond?</div><div><br></div><div>Shouldn't I get instead either (-5.0, -5.0, 10.0, 10.0) (same as with an unbounded surface), or at least (5.0, 5.0, 10.0, 10.0) (if the returned extents are relative to the lower left corner of the surface)?</div><div><br></div><div>Thanks in advance,</div><div><br></div><div>Antony Lee</div></div>