Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(169)

Side by Side Diff: skia/ext/skia_utils_mac.h

Issue 10543057: Initial RenderTextMac implementation using CoreText. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « base/mac/foundation_util.mm ('k') | ui/gfx/render_text_mac.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef SKIA_EXT_SKIA_UTILS_MAC_H_ 5 #ifndef SKIA_EXT_SKIA_UTILS_MAC_H_
6 #define SKIA_EXT_SKIA_UTILS_MAC_H_ 6 #define SKIA_EXT_SKIA_UTILS_MAC_H_
7 7
8 #include <ApplicationServices/ApplicationServices.h> 8 #include <ApplicationServices/ApplicationServices.h>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 SK_API CGAffineTransform SkMatrixToCGAffineTransform(const SkMatrix& matrix); 52 SK_API CGAffineTransform SkMatrixToCGAffineTransform(const SkMatrix& matrix);
53 53
54 // Rectangle converters. 54 // Rectangle converters.
55 SkRect CGRectToSkRect(const CGRect& rect); 55 SkRect CGRectToSkRect(const CGRect& rect);
56 56
57 // Converts a Skia rect to a CoreGraphics CGRect. 57 // Converts a Skia rect to a CoreGraphics CGRect.
58 CGRect SkIRectToCGRect(const SkIRect& rect); 58 CGRect SkIRectToCGRect(const SkIRect& rect);
59 CGRect SkRectToCGRect(const SkRect& rect); 59 CGRect SkRectToCGRect(const SkRect& rect);
60 60
61 // Converts CGColorRef to the ARGB layout Skia expects. 61 // Converts CGColorRef to the ARGB layout Skia expects.
62 SkColor CGColorRefToSkColor(CGColorRef color); 62 SK_API SkColor CGColorRefToSkColor(CGColorRef color);
63 63
64 // Converts ARGB to CGColorRef. 64 // Converts ARGB to CGColorRef.
65 CGColorRef SkColorToCGColorRef(SkColor color); 65 SK_API CGColorRef SkColorToCGColorRef(SkColor color);
66 66
67 // Converts NSColor to ARGB. Returns raw rgb values and does no colorspace 67 // Converts NSColor to ARGB. Returns raw rgb values and does no colorspace
68 // conversion. Only valid for colors in calibrated and device color spaces. 68 // conversion. Only valid for colors in calibrated and device color spaces.
69 SK_API SkColor NSDeviceColorToSkColor(NSColor* color); 69 SK_API SkColor NSDeviceColorToSkColor(NSColor* color);
70 70
71 // Converts ARGB to NSColor. 71 // Converts ARGB to NSColor.
72 SK_API NSColor* SkColorToCalibratedNSColor(SkColor color); 72 SK_API NSColor* SkColorToCalibratedNSColor(SkColor color);
73 SK_API NSColor* SkColorToDeviceNSColor(SkColor color); 73 SK_API NSColor* SkColorToDeviceNSColor(SkColor color);
74 74
75 // Converts a CGImage to a SkBitmap. 75 // Converts a CGImage to a SkBitmap.
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 SkCanvas* canvas_; 107 SkCanvas* canvas_;
108 CGContextRef cgContext_; 108 CGContextRef cgContext_;
109 SkBitmap bitmap_; 109 SkBitmap bitmap_;
110 bool useDeviceBits_; 110 bool useDeviceBits_;
111 }; 111 };
112 112
113 113
114 } // namespace gfx 114 } // namespace gfx
115 115
116 #endif // SKIA_EXT_SKIA_UTILS_MAC_H_ 116 #endif // SKIA_EXT_SKIA_UTILS_MAC_H_
OLDNEW
« no previous file with comments | « base/mac/foundation_util.mm ('k') | ui/gfx/render_text_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698