[cairo] Getting Bezier Control Points from a Smoothing Function

Lawrence D'Oliveiro ldo at geek-central.gen.nz
Tue Jun 20 23:08:09 UTC 2017


On Tue, 20 Jun 2017 14:29:21 -0400, cecashon at aol.com wrote:

> Lets say I want to draw a fish. So I work with a coordinate system
> and maybe use 0-1 or in this case 0-10 Cartesian. I sketch a general
> dot to dot sketch of my fish. Something to get me started. Then I can
> draw this sketch without trying to figure out where the control
> points might be. I can put something together quickly this way.

Drawing programs already do this. Look at Inkscape, or the Grease
Pencil tool in Blender. They both let you draw freehand curves, which
are initially represented as Béziers with a whole lot of control points.
Then you can simplify the curve, making it smoother if you want. Or
apply effects, animate it etc. Inkscape does this in 2D, Blender in 3D.
And both of them offer touch sensitivity.

Hard to see why you need features like this in the graphics library,
when there are applications that do it so much better.


More information about the cairo mailing list