ios - Using Core Graphics in Sprite Kit -


i using sprite kit. have shape following core graphics code:

cgmutablepathref pathref = cgpathcreatemutable(); cgpathmovetopoint(pathref, null, 300, 300); cgpathaddlinetopoint(pathref, null, 400, 300); cgpathaddcurvetopoint(pathref, null, 400, 335.727, 380.94, 368.739, 350, 386.603); cgpathclosesubpath(pathref);  cgcontextsetrgbfillcolor(ctx, 1, 1, 1, 1); cgcontextaddpath(ctx, pathref); cgcontextfillpath(ctx);  cgcontextsetlinewidth(ctx, 1); cgcontextsetrgbstrokecolor(ctx, 0, 0, 0, 1); cgcontextaddpath(ctx, pathref); cgcontextstrokepath(ctx);  cgpathrelease(pathref); 

i notice when add skshapenode, looses it's fill , stroke color. notice when scale object, treats spritenode, , not vector.

i know can adjust skshapenode's stroke, fill, stroke width, linecap, , other things.

i best of both worlds. how complete shape, fills, , strokes coregraphics sknode can translate , receive mouse click events?

thanks help.

core graphics properties ignored, on shape node applied.

skshapenode renders path onto texture, henceforth shape node no different sprite.

this how is. trading features better rendering performance.


Comments

Popular posts from this blog

c++ - QTextObjectInterface with Qml TextEdit (QQuickTextEdit) -

javascript - angular ng-required radio button not toggling required off in firefox 33, OK in chrome -

xcode - Swift Playground - Files are not readable -