[cairo] Mesh Control Points
ajohnson at redneon.com
Sun Apr 16 21:57:45 UTC 2017
On 17/04/17 06:54, cecashon at aol.com wrote:
> Hi Cairo Folks,
> I put together a little program that can dynamically draw a "tiled"
> mesh. It is working but I am having trouble understanding how P0, P1,
> P2, and P3 change the drawing.
The attached image from the cairo test suite shows how the control
points alter the image. The black squares have been added to show the
position of the control points.
> Looking at the documentation for
> cairo_pattern_create_mesh() it shows these control points inside the
> mesh. Where should all four control points be so the mesh would be the
> same as if it had no P control points? Are there some intitial default
> positions that I can use for the P control points? Thank you for any help.
>From the cairo API documentation:
"A Coons patch is a special case of the tensor-product patch
where the control points are implicitly defined by the sides
of the patch. The default value for any control point not
specified is the implicit value for a Coons patch, i.e. if
no control points are specified the patch is a Coons patch."
If you do not call cairo_mesh_pattern_set_control_point(), the control
points will default to the implicit location for a Coons patch.
In the attached image, the patch on the right is a Coons patch.
The patch on the left has non default control points making it
a tensor-product patch.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 10665 bytes
Desc: not available
More information about the cairo