[cairo] A hidden offset for the Xlib backend
Owen Taylor
otaylor at redhat.com
Mon Mar 14 06:26:36 PST 2005
On Mon, 2005-03-14 at 13:15 +0100, Jost Boekemeier wrote:
> I can get rid of the cairo_translate when replaying the retained path
> onto the surface:
>
> /* compose context */
> void
> retained_compose_draw (cairo_shape_compose_context_t *_cx,
> cairo_shape_drawing_context_t *_cr,
> cairo_shape_viewport_t *view,
> cairo_surface_t *surface)
>
> {
> struct retained* cr = (struct retained*) _cr;
> struct retained_compose* cx = (struct retained_compose*) _cx;
>
> cairo_save(cr->ct);
> cairo_set_target_surface(cr->ct, surface);
> cairo_translate(cr->ct, -view->bounds.x, -view->bounds.y);
> path_replay(view, cr);
> cairo_restore(cr->ct);
> }
I don't understand why there is an advantage to getting rid of
the cairo_translate() here.... presumably nothing in path_replay()
cares about device coordinates?
Regards,
Owen
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.freedesktop.org/archives/cairo/attachments/20050314/5fddc147/attachment.pgp
More information about the cairo
mailing list