]>
Commit | Line | Data |
---|---|---|
a90939db JF |
1 | // |
2 | // WKGraphics.h | |
3 | // | |
4 | // Copyright (C) 2005, 2006, 2007, Apple Inc. All rights reserved. | |
5 | // | |
6 | #import <CoreGraphics/CoreGraphics.h> | |
7 | #import <CoreGraphics/CoreGraphicsPrivate.h> | |
8 | ||
9 | #ifdef __cplusplus | |
10 | extern "C" { | |
11 | #endif | |
12 | ||
13 | typedef enum { | |
14 | WKNonZeroWindingRule = 0, | |
15 | WKEvenOddWindingRule = 1 | |
16 | } WKWindingRule; | |
17 | ||
18 | CGContextRef WKGetCurrentGraphicsContext(void); | |
19 | void WKSetCurrentGraphicsContext(CGContextRef context); | |
20 | ||
21 | void WKDrawFramedRect (CGContextRef context, CGRect aRect); | |
22 | void WKDrawFramedRectWithWidthUsingOperation (CGContextRef context, CGRect aRect, float frameWidth, CGCompositeOperation op); | |
23 | void WKRectFill (CGContextRef context, CGRect aRect); | |
24 | void WKRectFillList (CGContextRef context, const CGRect *rects, int count); | |
25 | void WKRectFillUsingOperation (CGContextRef context, CGRect aRect, CGCompositeOperation op); | |
26 | void WKRectFillListUsingOperation (CGContextRef context, const CGRect *rects, int count, CGCompositeOperation op); | |
27 | CGImageRef WKGraphicsCreateImageFromBundleWithName (const char *image_file); | |
28 | CGPatternRef WKCreatePatternFromCGImage(CGImageRef imageRef); | |
29 | void WKSetPattern(CGContextRef context, CGPatternRef pattern, bool fill, bool stroke); | |
30 | ||
31 | #ifdef __cplusplus | |
32 | } | |
33 | #endif | |
34 | ||
35 | #ifdef __cplusplus | |
36 | class WKFontAntialiasingStateSaver | |
37 | { | |
38 | public: | |
39 | ||
40 | WKFontAntialiasingStateSaver(bool useOrientationDependentFontAntialiasing) | |
41 | : m_useOrientationDependentFontAntialiasing(useOrientationDependentFontAntialiasing) | |
42 | { | |
43 | } | |
44 | ||
45 | void setup(bool isLandscapeOrientation); | |
46 | void restore(); | |
47 | ||
48 | private: | |
49 | ||
50 | bool m_useOrientationDependentFontAntialiasing; | |
51 | bool m_oldShouldUseFontSmoothing; | |
52 | CGFontAntialiasingStyle m_oldAntialiasingStyle; | |
53 | }; | |
54 | #endif |