| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2008, Google Inc. All rights reserved. | 2 * Copyright (c) 2008, Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 29 */ | 29 */ |
| 30 | 30 |
| 31 #ifndef SkiaFontWin_h | 31 #ifndef SkiaFontWin_h |
| 32 #define SkiaFontWin_h | 32 #define SkiaFontWin_h |
| 33 | 33 |
| 34 #include <windows.h> | 34 #include <windows.h> |
| 35 #include <usp10.h> | 35 #include <usp10.h> |
| 36 | 36 |
| 37 struct SkPoint; | 37 struct SkPoint; |
| 38 struct SkRect; |
| 38 | 39 |
| 39 namespace WebCore { | 40 namespace WebCore { |
| 40 | 41 |
| 41 class FontPlatformData; | 42 class FontPlatformData; |
| 42 class GraphicsContext; | 43 class GraphicsContext; |
| 43 | 44 |
| 44 // Note that the offsets parameter is optional. If not null it represents a | 45 // Note that the offsets parameter is optional. If not null it represents a |
| 45 // per glyph offset (such as returned by ScriptPlace Windows API function). | 46 // per glyph offset (such as returned by ScriptPlace Windows API function). |
| 46 void paintSkiaText(GraphicsContext*, | 47 void paintSkiaText(GraphicsContext*, |
| 47 const FontPlatformData&, | 48 const FontPlatformData&, |
| 48 int numGlyphs, | 49 int numGlyphs, |
| 49 const WORD* glyphs, | 50 const WORD* glyphs, |
| 50 const int* advances, | 51 const int* advances, |
| 51 const GOFFSET* offsets, | 52 const GOFFSET* offsets, |
| 52 const SkPoint* origin); | 53 const SkPoint& origin, |
| 54 const SkRect& textRect); |
| 53 | 55 |
| 54 // Note that the offsets parameter is optional. If not null it represents a | 56 // Note that the offsets parameter is optional. If not null it represents a |
| 55 // per glyph offset (such as returned by ScriptPlace Windows API function). | 57 // per glyph offset (such as returned by ScriptPlace Windows API function). |
| 56 // Note: this is less efficient than calling the version with FontPlatformData, | 58 // Note: this is less efficient than calling the version with FontPlatformData, |
| 57 // as that caches the SkTypeface object. | 59 // as that caches the SkTypeface object. |
| 58 void paintSkiaText(GraphicsContext*, | 60 void paintSkiaText(GraphicsContext*, |
| 59 HFONT, | 61 HFONT, |
| 60 int numGlyphs, | 62 int numGlyphs, |
| 61 const WORD* glyphs, | 63 const WORD* glyphs, |
| 62 const int* advances, | 64 const int* advances, |
| 63 const GOFFSET* offsets, | 65 const GOFFSET* offsets, |
| 64 const SkPoint* origin); | 66 const SkPoint& origin, |
| 67 const SkRect& textRect); |
| 65 | 68 |
| 66 } // namespace WebCore | 69 } // namespace WebCore |
| 67 | 70 |
| 68 #endif // SkiaFontWin_h | 71 #endif // SkiaFontWin_h |
| OLD | NEW |