cgcontextaddlines
Anyone has an idea of how to manage this situation?
iPhone 2.1, MBP, Mac OS X (10.5.5)
iPhone 2.1, MBP, Mac OS X (10.5.5)
CGPoint *pointarry;
numberofitems = <calc the current number of Points needed to be drawn>
pointarry = alloc(numberofitems * sizeof(CGPoint));
// Fill array...
// something like:
for (index = 0; index < numberofitems; index++) {
CGPointMakeWithDictionaryRepresentation(
currentPointAsDict,
&pointarry(index)
);
}
pointarry = alloc(numberofitems * sizeof(CGPoint));
CGPoint fineSegmento_tasto[100] = {CGPointMake(0.0,0.0),};
//fineSegmento = alloc(numeroDiLinea * sizeof(CGPoint)); <--not working
CFDictionaryRef dizionario = CGPointCreateDictionaryRepresentation(segmentoAttuale);
CGPointMakeWithDictionaryRepresentation(dizionario, &fineSegmento_tasto[numeroDiLinea]);
fineSegmento = fineSegmento_tasto;
NSLog(@"Punto 0: %f-%f _ Punto 1: %f-%f _ Punto 2: %f-%f", fineSegmento[0].x, fineSegmento[0].y,fineSegmento[1].x,fineSegmento[1].y,fineSegmento[2].x,fineSegmento[2].y);
[self setNeedsDisplay];
cgcontextaddlines