He doesn't understand your question, hence the tangential nature of the answer.
That 2D drawing exists in Cocos2D is a minor miracle.
Anyone from Apple, search for this, and consider it, it's true to its name, a very primitive type of 2D drawing this could be done much better if anyone was interested in providing dynamic drawing in 2D - I'm not posting a link because they get stuck waiting for needless approval:
is added to support
rendering. Previously, if we want to draw a custom geometry(sphere, line), we can only do this by using
. Now, what is need is to create a Primitive, set datas, and use the corresponding
to draw the Primitive.
Most programmers of 2D games and game engines have no idea what animated 2D drawing is, and why animators considering designing games might want it, let alone how it might be used.
But the fault doesn't start there.
Once 3D became a thing, 2D optimisations and empowerment became a thing of the past, and all graphics hardware focused its efforts on 3D.
So there's no efficient way to do 2D drawing, and to do it well (with the kind of flexibility and dynamism you probably desire) requires someone to build an engine that constricts OpenGL triangle creation to a 2D plane and starts creating your drawings with triangles on that plane.
For that to then work for custom lines and animating them requires a lot more work, and is the subject of many interesting articles on how to then anti-alias these flat textured polygons in 2D space so they look like lines we're comfortable viewing.
Sound ridiculous? It is.
It gets funnier, of course. This problem has extended far outside realtime engines: Adobe's After Effects doesn't have decent 2D dynamic drawing either. Nodes (vertices) of a 2D drawing are not individually addressable, only editable in what amounts to an "analogue" manner.
Sprite Kit has SKShapeNode, which I'm sure you've found, but it's performance is barely even good enough for debugging physics bodies, and immutable. It was never intended to be a drawing facility in the sense you're asking about.
I'm not sure it's possible to articulate to a programmer how a desirable, truly flexible dynamic drawing facility should work in under 50 back and forth exchanges because they have odd misconceptions and are primarily against it because it's a technical nightmare and much work to make something truly great in terms of dynamic 2D drawing.
Interestingly, the same immutablity problem exists in Scene Kit's geometry creation facilities. They really don't care for dynamic geometry, let alone dynamic drawing.