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

Side by Side Diff: include/core/SkPaint.h

Issue 14761003: API modifications needed to upstream Android font changes. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: refactored for upstream Created 7 years, 7 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 | « gyp/core.gyp ('k') | include/core/SkPaintOptionsAndroid.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 1
2 2
3 /* 3 /*
4 * Copyright 2006 The Android Open Source Project 4 * Copyright 2006 The Android Open Source Project
5 * 5 *
6 * Use of this source code is governed by a BSD-style license that can be 6 * Use of this source code is governed by a BSD-style license that can be
7 * found in the LICENSE file. 7 * found in the LICENSE file.
8 */ 8 */
9 9
10 10
11 #ifndef SkPaint_DEFINED 11 #ifndef SkPaint_DEFINED
12 #define SkPaint_DEFINED 12 #define SkPaint_DEFINED
13 13
14 #include "SkColor.h" 14 #include "SkColor.h"
15 #include "SkDrawLooper.h" 15 #include "SkDrawLooper.h"
16 #include "SkXfermode.h" 16 #include "SkXfermode.h"
17 #ifdef SK_BUILD_FOR_ANDROID
18 #include "SkPaintOptionsAndroid.h"
19 #endif
17 20
18 class SkAnnotation; 21 class SkAnnotation;
19 class SkAutoGlyphCache; 22 class SkAutoGlyphCache;
20 class SkColorFilter; 23 class SkColorFilter;
21 class SkDescriptor; 24 class SkDescriptor;
22 struct SkDeviceProperties; 25 struct SkDeviceProperties;
23 class SkFlattenableReadBuffer; 26 class SkFlattenableReadBuffer;
24 class SkFlattenableWriteBuffer; 27 class SkFlattenableWriteBuffer;
25 struct SkGlyph; 28 struct SkGlyph;
26 struct SkRect; 29 struct SkRect;
(...skipping 604 matching lines...) Expand 10 before | Expand all | Expand 10 after
631 /** Return the paint's Align value for drawing text. 634 /** Return the paint's Align value for drawing text.
632 @return the paint's Align value for drawing text. 635 @return the paint's Align value for drawing text.
633 */ 636 */
634 Align getTextAlign() const { return (Align)fTextAlign; } 637 Align getTextAlign() const { return (Align)fTextAlign; }
635 638
636 /** Set the paint's text alignment. 639 /** Set the paint's text alignment.
637 @param align set the paint's Align value for drawing text. 640 @param align set the paint's Align value for drawing text.
638 */ 641 */
639 void setTextAlign(Align align); 642 void setTextAlign(Align align);
640 643
644 #ifdef SK_BUILD_FOR_ANDROID
reed1 2013/05/09 20:35:38 can we move the getter (do we have one?) for genre
645 const SkPaintOptionsAndroid& getPaintOptionsAndroid() const { return fPaintO ptionsAndroid; }
reed1 2013/05/09 20:35:38 nit: 80 for this file. getPaintOptionsANdorid() c
646 void setPaintOptionsAndroid(const SkPaintOptionsAndroid& options);
647 #endif
648
641 /** Return the paint's text size. 649 /** Return the paint's text size.
642 @return the paint's text size. 650 @return the paint's text size.
643 */ 651 */
644 SkScalar getTextSize() const { return fTextSize; } 652 SkScalar getTextSize() const { return fTextSize; }
645 653
646 /** Set the paint's text size. This value must be > 0 654 /** Set the paint's text size. This value must be > 0
647 @param textSize set the paint's text size. 655 @param textSize set the paint's text size.
648 */ 656 */
649 void setTextSize(SkScalar textSize); 657 void setTextSize(SkScalar textSize);
650 658
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
983 kCanonicalTextSizeForPaths = 64 991 kCanonicalTextSizeForPaths = 64
984 }; 992 };
985 friend class SkAutoGlyphCache; 993 friend class SkAutoGlyphCache;
986 friend class SkCanvas; 994 friend class SkCanvas;
987 friend class SkDraw; 995 friend class SkDraw;
988 friend class SkGraphics; // So Term() can be called. 996 friend class SkGraphics; // So Term() can be called.
989 friend class SkPDFDevice; 997 friend class SkPDFDevice;
990 friend class SkTextToPathIter; 998 friend class SkTextToPathIter;
991 999
992 #ifdef SK_BUILD_FOR_ANDROID 1000 #ifdef SK_BUILD_FOR_ANDROID
1001 SkPaintOptionsAndroid fPaintOptionsAndroid;
1002
993 // In order for the == operator to work properly this must be the last field 1003 // In order for the == operator to work properly this must be the last field
994 // in the struct so that we can do a memcmp to this field's offset. 1004 // in the struct so that we can do a memcmp to this field's offset.
995 uint32_t fGenerationID; 1005 uint32_t fGenerationID;
996 #endif 1006 #endif
997 }; 1007 };
998 1008
999 #endif 1009 #endif
OLDNEW
« no previous file with comments | « gyp/core.gyp ('k') | include/core/SkPaintOptionsAndroid.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698