Passing & Receiving Structures

Mac OSX specific forum
coder14
Enthusiast
Enthusiast
Posts: 327
Joined: Tue Jun 21, 2011 10:39 am

Passing & Receiving Structures

Post 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.
WilliamL
Addict
Addict
Posts: 1252
Joined: Mon Aug 04, 2008 10:56 pm
Location: Seattle, USA

Re: Passing & Receiving Structures

Post 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.
MacBook Pro-M1 (2021), Sequoia 15.4, PB 6.20
wilbert
PureBasic Expert
PureBasic Expert
Posts: 3942
Joined: Sun Aug 08, 2004 5:21 am
Location: Netherlands

Re: Passing & Receiving Structures

Post by wilbert »

Post Reply