On 1 Dec 2009, at 05:27, Jonathan Dann wrote:
Just use NSPointerArray...
Just as is the case with an array of NSValue objects, NSPointerArray doesn't
help here -- it makes no guarantees about how the objects will be arranged in
memory, and NSBezierPath needs them to be
On Nov 27, 2009, at 14:58, Shane wrote:
I think I'm understanding this in part ...
// *.h
NSMutableData *pointData;
NSPointArray *points;
// *.m
pointData = [[NSMutableData alloc] init];
...
NSPoint point = NSMakePoint([iters floatValue], [mse
On Nov 28, 2009, at 2:50 PM, Quincey Morris wrote:
On Nov 27, 2009, at 14:58, Shane wrote:
I think I'm understanding this in part ...
// *.h
NSMutableData *pointData;
NSPointArray *points;
// *.m
pointData = [[NSMutableData alloc] init];
...
NSPoint
On 28 Nov 2009, at 15:12, Henry McGilton (Boulevardier) wrote:
Another possible approach is simply use a NSMutableArray full of NSValue
objects that contain
the NSPoint structures . . .
I don't believe that'll work - storing everything in NSValue objects will end
up scattering the actual
I don't know how large my NSPointArray size needs to be so I'd like to
know how I would dynamically allocate NSPoints to populate an
NSPointArray? I think I can do it with NSMutableArray, but
NSBezierPath takes an NSPointArray (which is what my end result is for
the points) and it just seems
On Nov 27, 2009, at 12:46, Shane wrote:
I don't know how large my NSPointArray size needs to be so I'd like to
know how I would dynamically allocate NSPoints to populate an
NSPointArray? I think I can do it with NSMutableArray, but
NSBezierPath takes an NSPointArray (which is what my end
The easiest way (and Objective-C-ish way) is to use a NSMutableData object
with the NSPointArray as its data. Whenever you want to add points, just
resize the NSMutableData object to 'sizeof (NSPoint)' * total number of
points, and use '(NSPointArray) [data mutableBytes]' as a pointer to
On 28/11/2009, at 7:46 AM, Shane wrote:
I don't know how large my NSPointArray size needs to be so I'd like to
know how I would dynamically allocate NSPoints to populate an
NSPointArray? I think I can do it with NSMutableArray, but
NSBezierPath takes an NSPointArray (which is what my end
Why not just accumulate the points directly into NSBezierPath? It can be
thought of as an array of points in a sense. Unless there's a compelling need
to have the points themselves available in addition to the bezier path, just
cut out the middle man (and it's not difficult to retrieve the
On 28/11/2009, at 10:37 AM, Shane wrote:
Why not just accumulate the points directly into NSBezierPath? It can be
thought of as an array of points in a sense. Unless there's a compelling
need to have the points themselves available in addition to the bezier path,
just cut out the middle
10 matches
Mail list logo