| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2006 The Android Open Source Project | 2 * Copyright 2006 The Android Open Source Project |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #ifndef SkPaint_DEFINED | 8 #ifndef SkPaint_DEFINED |
| 9 #define SkPaint_DEFINED | 9 #define SkPaint_DEFINED |
| 10 | 10 |
| 11 #include "SkColor.h" | 11 #include "SkColor.h" |
| 12 #include "SkDrawLooper.h" | 12 #include "SkDrawLooper.h" |
| 13 #include "SkFilterQuality.h" | 13 #include "SkFilterQuality.h" |
| 14 #include "SkMatrix.h" | 14 #include "SkMatrix.h" |
| 15 #include "SkXfermode.h" | 15 #include "SkXfermode.h" |
| 16 | 16 |
| 17 // TODO: clean up Skia internals so we can remove this and only keep it for clie
nts | |
| 18 #define SK_SUPPORT_LEGACY_FILTERLEVEL_ENUM | |
| 19 | |
| 20 class SkAnnotation; | 17 class SkAnnotation; |
| 21 class SkAutoGlyphCache; | 18 class SkAutoGlyphCache; |
| 22 class SkColorFilter; | 19 class SkColorFilter; |
| 23 class SkData; | 20 class SkData; |
| 24 class SkDescriptor; | 21 class SkDescriptor; |
| 25 struct SkDeviceProperties; | 22 struct SkDeviceProperties; |
| 26 class SkReadBuffer; | 23 class SkReadBuffer; |
| 27 class SkWriteBuffer; | 24 class SkWriteBuffer; |
| 28 class SkGlyph; | 25 class SkGlyph; |
| 29 struct SkRect; | 26 struct SkRect; |
| (...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 331 SkFilterQuality getFilterQuality() const { | 328 SkFilterQuality getFilterQuality() const { |
| 332 return (SkFilterQuality)fBitfields.fFilterQuality; | 329 return (SkFilterQuality)fBitfields.fFilterQuality; |
| 333 } | 330 } |
| 334 | 331 |
| 335 /** | 332 /** |
| 336 * Set the filter quality. This affects the quality (and performance) of | 333 * Set the filter quality. This affects the quality (and performance) of |
| 337 * drawing scaled images. | 334 * drawing scaled images. |
| 338 */ | 335 */ |
| 339 void setFilterQuality(SkFilterQuality quality); | 336 void setFilterQuality(SkFilterQuality quality); |
| 340 | 337 |
| 338 #ifdef SK_SUPPORT_LEGACY_FILTERLEVEL_ENUM |
| 341 /** | 339 /** |
| 342 * If the predicate is true, set the filterLevel to Low, else set it to | 340 * If the predicate is true, set the filterLevel to Low, else set it to |
| 343 * None. | 341 * None. |
| 344 */ | 342 */ |
| 345 SK_ATTR_DEPRECATED("use setFilterLevel") | 343 SK_ATTR_DEPRECATED("use setFilterLevel") |
| 346 void setFilterBitmap(bool doFilter) { | 344 void setFilterBitmap(bool doFilter) { |
| 347 this->setFilterLevel(doFilter ? kLow_FilterLevel : kNone_FilterLevel); | 345 this->setFilterLevel(doFilter ? kLow_FilterLevel : kNone_FilterLevel); |
| 348 } | 346 } |
| 349 | 347 |
| 350 /** | 348 /** |
| 351 * Returns true if getFilterLevel() returns anything other than None. | 349 * Returns true if getFilterLevel() returns anything other than None. |
| 352 */ | 350 */ |
| 353 SK_ATTR_DEPRECATED("use getFilterLevel") | 351 SK_ATTR_DEPRECATED("use getFilterLevel") |
| 354 bool isFilterBitmap() const { | 352 bool isFilterBitmap() const { |
| 355 return kNone_FilterLevel != this->getFilterLevel(); | 353 return kNone_FilterLevel != this->getFilterLevel(); |
| 356 } | 354 } |
| 355 #endif |
| 357 | 356 |
| 358 /** Styles apply to rect, oval, path, and text. | 357 /** Styles apply to rect, oval, path, and text. |
| 359 Bitmaps are always drawn in "fill", and lines are always drawn in | 358 Bitmaps are always drawn in "fill", and lines are always drawn in |
| 360 "stroke". | 359 "stroke". |
| 361 | 360 |
| 362 Note: strokeandfill implicitly draws the result with | 361 Note: strokeandfill implicitly draws the result with |
| 363 SkPath::kWinding_FillType, so if the original path is even-odd, the | 362 SkPath::kWinding_FillType, so if the original path is even-odd, the |
| 364 results may not appear the same as if it was drawn twice, filled and | 363 results may not appear the same as if it was drawn twice, filled and |
| 365 then stroked. | 364 then stroked. |
| 366 */ | 365 */ |
| (...skipping 777 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1144 friend class GrBitmapTextContext; | 1143 friend class GrBitmapTextContext; |
| 1145 friend class GrDistanceFieldTextContext; | 1144 friend class GrDistanceFieldTextContext; |
| 1146 friend class GrStencilAndCoverTextContext; | 1145 friend class GrStencilAndCoverTextContext; |
| 1147 friend class GrPathRendering; | 1146 friend class GrPathRendering; |
| 1148 friend class GrGLPathRendering; | 1147 friend class GrGLPathRendering; |
| 1149 friend class SkTextToPathIter; | 1148 friend class SkTextToPathIter; |
| 1150 friend class SkCanonicalizePaint; | 1149 friend class SkCanonicalizePaint; |
| 1151 }; | 1150 }; |
| 1152 | 1151 |
| 1153 #endif | 1152 #endif |
| OLD | NEW |