OLD | NEW |
1 /* libs/graphics/sgl/SkPaint.cpp | 1 /* libs/graphics/sgl/SkPaint.cpp |
2 ** | 2 ** |
3 ** Copyright 2006, The Android Open Source Project | 3 ** Copyright 2006, The Android Open Source Project |
4 ** | 4 ** |
5 ** Licensed under the Apache License, Version 2.0 (the "License");· | 5 ** Licensed under the Apache License, Version 2.0 (the "License");· |
6 ** you may not use this file except in compliance with the License.· | 6 ** you may not use this file except in compliance with the License.· |
7 ** You may obtain a copy of the License at· | 7 ** You may obtain a copy of the License at· |
8 ** | 8 ** |
9 ** http://www.apache.org/licenses/LICENSE-2.0· | 9 ** http://www.apache.org/licenses/LICENSE-2.0· |
10 ** | 10 ** |
(...skipping 17 matching lines...) Expand all Loading... |
28 #include "SkTypeface.h" | 28 #include "SkTypeface.h" |
29 #include "SkXfermode.h" | 29 #include "SkXfermode.h" |
30 #include "SkAutoKern.h" | 30 #include "SkAutoKern.h" |
31 | 31 |
32 #define SK_DefaultTextSize SkIntToScalar(12) | 32 #define SK_DefaultTextSize SkIntToScalar(12) |
33 | 33 |
34 #define SK_DefaultFlags 0 //(kNativeHintsText_Flag) | 34 #define SK_DefaultFlags 0 //(kNativeHintsText_Flag) |
35 | 35 |
36 SkPaint::SkPaint() | 36 SkPaint::SkPaint() |
37 { | 37 { |
| 38 memset(this, 0, sizeof(*this)); |
| 39 |
38 fTypeface = NULL; | 40 fTypeface = NULL; |
39 fTextSize = SK_DefaultTextSize; | 41 fTextSize = SK_DefaultTextSize; |
40 fTextScaleX = SK_Scalar1; | 42 fTextScaleX = SK_Scalar1; |
41 fTextSkewX = 0; | 43 fTextSkewX = 0; |
42 | 44 |
43 fPathEffect = NULL; | 45 fPathEffect = NULL; |
44 fShader = NULL; | 46 fShader = NULL; |
45 fXfermode = NULL; | 47 fXfermode = NULL; |
46 fMaskFilter = NULL; | 48 fMaskFilter = NULL; |
47 fColorFilter = NULL; | 49 fColorFilter = NULL; |
(...skipping 1587 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1635 | 1637 |
1636 if (glyph.fWidth) | 1638 if (glyph.fWidth) |
1637 { | 1639 { |
1638 if (xpos) | 1640 if (xpos) |
1639 *xpos = fXPos; | 1641 *xpos = fXPos; |
1640 return fCache->findPath(glyph); | 1642 return fCache->findPath(glyph); |
1641 } | 1643 } |
1642 } | 1644 } |
1643 return NULL; | 1645 return NULL; |
1644 } | 1646 } |
OLD | NEW |