Page 1 of 1

Passing & Receiving Structures

Posted: Tue Jul 26, 2011 5:27 pm
by coder14
Hello Everyone!
In some of the APIs for OSX, we are required to pass values, and sometimes receive results, in structures, for example in CoreGraphics:

Code: Select all

CGRectMake(cgRECT, x, y, width, height)  <<=== cgRECT is an OSX RECT structure that receives the result

CGContextStrokeRect(cgContext, cgRECT) <<=== cgRECT is the rectangle to be drawn

transform = CGAffineTransformMakeRotation(radianAngle) <<=== transform is an OSX structure that holds an array of float values

CGContextSetTextMatrix(cgContext, transform) <<=== the transform structure is passed to rotate the display matrix
Does anyone know how to pass and receive such structures to and from the API?

Please help.

Thank you.

Re: Passing & Receiving Structures

Posted: Wed Jul 27, 2011 3:20 am
by WilliamL
Does this or this help?

I see that you posted the same question in the Coding Questions and I liked this but I have no idea if it would work.

Re: Passing & Receiving Structures

Posted: Wed Jul 27, 2011 7:50 am
by wilbert