Re: Mesh Control Points
Adrian Johnson <[email protected]>
| Newsgroups | gmane.comp.lib.cairo |
|---|---|
| Message-ID | <[email protected]> |
On 17/04/17 06:54, [email protected] 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. > > Eric > > https://github.com/cecashon/OrderedSetVelociRaptor/blob/master/Misc/cairo_drawings/draw_mesh1.c > > > -- cairo mailing list [email protected] https://lists.cairographics.org/mailman/listinfo/cairo
mesh-pattern-control-points.ref.png
(image/png, 10.4 KB) - not displayed