-
Notifications
You must be signed in to change notification settings - Fork 13
Add new functions to Opal #7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
2c4725b
dca7c11
e8271a9
879e4f3
ffa5d7f
8454a24
f8677b0
627b030
477c1a4
dc4592f
dac2a33
8faeac4
0593b06
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -138,6 +138,22 @@ enum { | |
| }; | ||
| typedef int CGTextEncoding; | ||
|
|
||
| // NOTE: This `typedef enum` in opposition to defining enum constants and | ||
| // their types as integers is here to maintain compatibility with the original | ||
| // CoreGraphics API, although this is *NOT* an ideal way to define these types. | ||
| typedef enum { | ||
| kCGContextTypeUnknown, | ||
| kCGContextTypePDF, | ||
| kCGContextTypePostScript, | ||
| kCGContextTypeWindow, | ||
| kCGContextTypeBitmap, | ||
| kCGContextTypeGL, | ||
| kCGContextTypeDisplayList, | ||
| kCGContextTypeKSeparation, | ||
| kCGContextTypeIOSurface, | ||
| kCGContextTypeCount | ||
| } CGContextType; | ||
|
|
||
| /* Functions */ | ||
|
|
||
| /* Managing Graphics Contexts */ | ||
|
|
@@ -562,6 +578,31 @@ CGRect CGContextConvertRectToDeviceSpace(CGContextRef ctx, CGRect rect); | |
|
|
||
| CGRect CGContextConvertRectToUserSpace(CGContextRef ctx, CGRect rect); | ||
|
|
||
| bool CGContextPathContainsPoint(CGContextRef c, | ||
| CGPoint point, CGPathDrawingMode mode); | ||
|
|
||
| /* CoreGraphics Private APIs */ | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since these are not part of the public API, I propose we move them into a separate header + implementation file.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This function gets exported by the Apple implementation as well. Having it here is fine.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Well, I selected line 584 when I was creating the commit, not my fault that GitHub has... flaws. 😄 I was referring to all the APIs below that were marked as private. I did not check any to be private except |
||
|
|
||
| bool CGContextGetShouldSmoothFonts(CGContextRef ctx); | ||
|
|
||
| bool CGContextGetShouldAntialias(CGContextRef ctx); | ||
|
|
||
| CGContextType CGContextGetType(CGContextRef ctx); | ||
|
|
||
| void CGContextSetCTM(CGContextRef ctx, CGAffineTransform m); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The last two are the one functions I cannot find in the Apple header, these should be moved away.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Out of these, it looks like only |
||
|
|
||
| CGAffineTransform CGContextGetBaseCTM(CGContextRef); | ||
|
|
||
| void CGContextSetBaseCTM(CGContextRef, CGAffineTransform); | ||
|
|
||
| CGColorSpaceRef CGContextCopyDeviceColorSpace(CGContextRef); | ||
|
|
||
| void CGContextSetShouldAntialiasFonts(CGContextRef, bool shouldAntialiasFonts); | ||
|
|
||
| bool CGDisplayUsesInvertedPolarity(void); | ||
|
|
||
| bool CGDisplayUsesForceToGray(void); | ||
|
|
||
| /* Opal Extensions */ | ||
|
|
||
| // FIXME: Move extensions to a separate header? | ||
|
|
@@ -583,9 +624,6 @@ OPGStateRef OPContextCopyGState(CGContextRef ctx); | |
|
|
||
| void OPContextSetGState(CGContextRef ctx, OPGStateRef gstate); | ||
|
|
||
| bool CGContextPathContainsPoint(CGContextRef c, | ||
| CGPoint point, CGPathDrawingMode mode); | ||
|
|
||
| #ifdef __cplusplus | ||
| } | ||
| #endif | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where did you find these values? As WebKit has its own definitions of these values we should kept them private within Opal.