Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Headers/CoreGraphics/CGAffineTransform.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ extern "C" {

/* Data Types */

// Defined by CoreFoundation/CFCGTypes.h in GNUstep Base
#ifndef CF_DEFINES_CG_TYPES
typedef struct CGAffineTransform
{
CGFloat a;
Expand All @@ -43,6 +45,7 @@ typedef struct CGAffineTransform
CGFloat tx;
CGFloat ty;
} CGAffineTransform;
#endif // !CF_DEFINES_CG_TYPES

/* Constants */

Expand Down
10 changes: 10 additions & 0 deletions Headers/CoreGraphics/CGGeometry.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
extern "C" {
#endif

// Defined by CoreFoundation/CFCGTypes.h in GNUstep Base
#ifndef CF_DEFINES_CG_TYPES
typedef NSPoint CGPoint;
typedef NSSize CGSize;
typedef NSRect CGRect;
Expand All @@ -46,6 +48,8 @@ enum
CGRectMaxXEdge = 2,
CGRectMaxYEdge = 3
};
#endif // !CF_DEFINES_CG_TYPES

typedef int CGRectEdge;

/** Point at 0,0 */
Expand Down Expand Up @@ -90,12 +94,15 @@ OP_GEOM_SCOPE CGSize CGSizeMake(CGFloat width, CGFloat height) OP_GEOM_ATTR;
/** Returns a CGRect having point of origin (x, y) and size (width, height). */
OP_GEOM_SCOPE CGRect CGRectMake(CGFloat x, CGFloat y, CGFloat width, CGFloat height) OP_GEOM_ATTR;

// Defined by Foundation/NSGeometry.h in GNUstep Base
#ifndef CF_DEFINES_CG_TYPES
OP_GEOM_SCOPE CGRect NSRectToCGRect(NSRect rect);
OP_GEOM_SCOPE NSRect NSRectFromCGRect(CGRect rect);
OP_GEOM_SCOPE CGPoint NSPointToCGPoint(NSPoint point);
OP_GEOM_SCOPE NSPoint NSPointFromCGPoint(CGPoint point);
OP_GEOM_SCOPE NSSize NSSizeFromCGSize(CGSize size);
OP_GEOM_SCOPE CGSize NSSizeToCGSize(NSSize size);
#endif // !CF_DEFINES_CG_TYPES

/** Returns an equivalent rect which has positive width and heght. */
OP_GEOM_SCOPE CGRect CGRectStandardize(CGRect rect) OP_GEOM_ATTR;
Expand Down Expand Up @@ -329,6 +336,8 @@ OP_GEOM_SCOPE CGRect CGRectMake(CGFloat x, CGFloat y, CGFloat width, CGFloat hei
return rect;
}

// Defined by Foundation/NSGeometry.h in GNUstep Base
#ifndef CF_DEFINES_CG_TYPES
OP_GEOM_SCOPE CGRect NSRectToCGRect(NSRect rect)
{
CGRect cgrect;
Expand Down Expand Up @@ -386,6 +395,7 @@ OP_GEOM_SCOPE CGSize NSSizeToCGSize(NSSize size)
cgsize.height = size.height;
return cgsize;
}
#endif // !CF_DEFINES_CG_TYPES

OP_GEOM_SCOPE CGRect CGRectStandardize(CGRect rect)
{
Expand Down