objective c - How to use NSPointArray? -
so want use method appendbezierpathwithpoints:count:
in nsbezierpath. method requires me use nspointarray. documentary doesn't talk , it's array of nspoints , i'm not sure how it. think uses c array mechanism, i'm not sure.
thanks.
yes, need c-style array of points pass appendbezierpathwithpoints:count:
. example might this:
nspoint pointarray[3]; pointarray[0] = nsmakepoint(0, 0); pointarray[1] = nsmakepoint(0.5, 0.25); pointarray[2] = nsmakepoint(1, 1); [lines appendbezierpathwithpoints:pointarray count:3];
where lines
instance of nsbezierpath
.
in more complicated case you'll use variable number of points say.
Comments
Post a Comment