[cairo] mesh APi naming (was: cairo snapshot 1.11.2 now available)
ranma42 at gmail.com
Thu Jan 27 16:19:10 PST 2011
On Thu, Jan 27, 2011 at 10:00 PM, Chris Wilson <chris at chris-wilson.co.uk> wrote:
> On Thu, 27 Jan 2011 18:51:49 +0100, Benjamin Otte <otte at redhat.com> wrote:
>> On Sun, 2011-01-23 at 16:59 +0000, Chris Wilson wrote:
>> > API additions:
>> > The ability to construct piece-wise Bezier surface gradients:
>> > cairo_pattern_create_mesh
>> > constructs a pattern of type CAIRO_PATTERN_TYPE_MESH using
>> > cairo_pattern_mesh_begin_patch
>> > cairo_pattern_mesh_end_patch
>> Why are we using cairo_pattern_mesh_foo instead of
>> cairo_mesh_pattern_foo in the API?
>> Isn't it a mesh pattern and not a pattern mesh?
> The public struct is cairo_pattern_t and the other specialised setters
> take the form cairo_pattern_add_color_stop_rgba. Though the existing
> gradients do not require such a complicated constructor.
> So yes, it should be cairo_pattern_foo(), the question is whether _mesh_
> is useful in the name.
> So an alternative would be:
> But that leaves the reader in doubt over the applicability of the method
> to the cairo_pattern_t in hand, and will quickly lead to congestion of the
> cairo_pattern namespace. (The latter is more of a moot point.)
> work any better?
This was the original naming proposed by Adrian, which was
changed to the current naming scheme after
More information about the cairo