Passing & Receiving Structures
Posted: Tue Jul 26, 2011 5:27 pm
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:
Does anyone know how to pass and receive such structures to and from the API?
Please help.
Thank you.
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
Please help.
Thank you.