CGSSetWindowWarp not working in 64 bits apps
I am developping a Mac OS X app using the undocum开发者_如何学运维mented CGSSetWindowWarp function. Everything is ok when compiing in 32 bits but it stop to work (window dissapear completly) when compiling in 64 bits. Do you have any idée where the issue can be?
Thanks in advance for your help
Regards,
Are you sure about the function signature? The size of the parameters might have changed / might not have changed but int needs to be short, etc.
Or they might have stopped supporting that function altogether.
The points in the warp mesh are not actually CGPoints
, they use float
for x
and y
even in 64-bit. (CGPoint
uses double
on 64-bit)
You can redefine the warp mesh and function like this:
typedef struct CGSPoint {
float x;
float y;
} CGSPoint;
typedef struct {
CGSPoint local;
CGSPoint global;
} CGSPointWarp;
extern CGError CGSSetWindowWarp(CGSConnectionID conn, CGSWindowID window, int w, int h, CGSPointWarp **mesh)
精彩评论