It is currently Sun May 19, 2013 9:45 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Passing & Receiving Structures
PostPosted: Tue Jul 26, 2011 5:27 pm 
Offline
User
User

Joined: Tue Jun 21, 2011 10:39 am
Posts: 33
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:
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.


Top
 Profile  
 
 Post subject: Re: Passing & Receiving Structures
PostPosted: Wed Jul 27, 2011 3:20 am 
Offline
Addict
Addict
User avatar

Joined: Mon Aug 04, 2008 10:56 pm
Posts: 849
Location: Seattle, USA
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/Retina, OSX 10.8.3 Mountain Lion, PB-5.11x64


Top
 Profile  
 
 Post subject: Re: Passing & Receiving Structures
PostPosted: Wed Jul 27, 2011 7:50 am 
Offline
Addict
Addict

Joined: Sun Aug 08, 2004 5:21 am
Posts: 1084
Location: Netherlands
I posted my answer here
viewtopic.php?f=13&t=47006&p=357296#p357296


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye