| 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 |
| (...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 402 A dash with an on interval of zero also creates a zero length contour. | 402 A dash with an on interval of zero also creates a zero length contour. |
| 403 | 403 |
| 404 The zero length contour draws the square cap without rotation, since | 404 The zero length contour draws the square cap without rotation, since |
| 405 the no direction can be inferred. | 405 the no direction can be inferred. |
| 406 */ | 406 */ |
| 407 enum Cap { | 407 enum Cap { |
| 408 kButt_Cap, //!< begin/end contours with no extension | 408 kButt_Cap, //!< begin/end contours with no extension |
| 409 kRound_Cap, //!< begin/end contours with a semi-circle extension | 409 kRound_Cap, //!< begin/end contours with a semi-circle extension |
| 410 kSquare_Cap, //!< begin/end contours with a half square extension | 410 kSquare_Cap, //!< begin/end contours with a half square extension |
| 411 | 411 |
| 412 kCapCount, | 412 kLast_Cap = kSquare_Cap, |
| 413 kDefault_Cap = kButt_Cap | 413 kDefault_Cap = kButt_Cap |
| 414 }; | 414 }; |
| 415 static constexpr int kCapCount = kLast_Cap + 1; |
| 415 | 416 |
| 416 /** Join enum specifies the settings for the paint's strokejoin. This is | 417 /** Join enum specifies the settings for the paint's strokejoin. This is |
| 417 the treatment that is applied to corners in paths and rectangles. | 418 the treatment that is applied to corners in paths and rectangles. |
| 418 */ | 419 */ |
| 419 enum Join { | 420 enum Join { |
| 420 kMiter_Join, //!< connect path segments with a sharp join | 421 kMiter_Join, //!< connect path segments with a sharp join |
| 421 kRound_Join, //!< connect path segments with a round join | 422 kRound_Join, //!< connect path segments with a round join |
| 422 kBevel_Join, //!< connect path segments with a flat bevel join | 423 kBevel_Join, //!< connect path segments with a flat bevel join |
| 423 | 424 |
| 424 kJoinCount, | 425 kLast_Join = kBevel_Join, |
| 425 kDefault_Join = kMiter_Join | 426 kDefault_Join = kMiter_Join |
| 426 }; | 427 }; |
| 428 static constexpr int kJoinCount = kLast_Join + 1; |
| 427 | 429 |
| 428 /** Return the paint's stroke cap type, controlling how the start and end | 430 /** Return the paint's stroke cap type, controlling how the start and end |
| 429 of stroked lines and paths are treated. | 431 of stroked lines and paths are treated. |
| 430 @return the line cap style for the paint, used whenever the paint's | 432 @return the line cap style for the paint, used whenever the paint's |
| 431 style is Stroke or StrokeAndFill. | 433 style is Stroke or StrokeAndFill. |
| 432 */ | 434 */ |
| 433 Cap getStrokeCap() const { return (Cap)fBitfields.fCapType; } | 435 Cap getStrokeCap() const { return (Cap)fBitfields.fCapType; } |
| 434 | 436 |
| 435 /** Set the paint's stroke cap type. | 437 /** Set the paint's stroke cap type. |
| 436 @param cap set the paint's line cap style, used whenever the paint's | 438 @param cap set the paint's line cap style, used whenever the paint's |
| (...skipping 733 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1170 friend class GrStencilAndCoverTextContext; | 1172 friend class GrStencilAndCoverTextContext; |
| 1171 friend class GrPathRendering; | 1173 friend class GrPathRendering; |
| 1172 friend class GrTextUtils; | 1174 friend class GrTextUtils; |
| 1173 friend class GrGLPathRendering; | 1175 friend class GrGLPathRendering; |
| 1174 friend class SkScalerContext; | 1176 friend class SkScalerContext; |
| 1175 friend class SkTextBaseIter; | 1177 friend class SkTextBaseIter; |
| 1176 friend class SkCanonicalizePaint; | 1178 friend class SkCanonicalizePaint; |
| 1177 }; | 1179 }; |
| 1178 | 1180 |
| 1179 #endif | 1181 #endif |
| OLD | NEW |