Pekka Paalanen wrote:

If you wanted this to work also on transformed surfaces, I think you
would need to transform all four corners, and then operate on the
bounding box. When returning the result, account for the boundingbox's
effect on the coordinates.

I do not believe that will result in any good behavior. It will clip to a much-too-small box.

Technically the only correct solution is to return a region (not a rectangle) describing what will be visible. However that is rather a pain for clients to deal with.

I recommend that the rectangle be transformed to a approximation with the correct area in the global coordinates, clipped, and that clip transformed back as an approximation. This has worked extremely well for some drawing code we are using, though the objects are rounded rectangles. I posted how to do this transform in a previous email.
_______________________________________________
wayland-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to