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, | |
413 kDefault_Cap = kButt_Cap | 412 kDefault_Cap = kButt_Cap |
414 }; | 413 }; |
robertphillips
2016/07/06 15:01:47
Have we given up on the whole 'kLast_Cap' thing ?
bsalomon
2016/07/06 15:57:53
Done
| |
414 static constexpr int kCapCount = 3; | |
415 | 415 |
416 /** Join enum specifies the settings for the paint's strokejoin. This is | 416 /** Join enum specifies the settings for the paint's strokejoin. This is |
417 the treatment that is applied to corners in paths and rectangles. | 417 the treatment that is applied to corners in paths and rectangles. |
418 */ | 418 */ |
419 enum Join { | 419 enum Join { |
420 kMiter_Join, //!< connect path segments with a sharp join | 420 kMiter_Join, //!< connect path segments with a sharp join |
421 kRound_Join, //!< connect path segments with a round join | 421 kRound_Join, //!< connect path segments with a round join |
422 kBevel_Join, //!< connect path segments with a flat bevel join | 422 kBevel_Join, //!< connect path segments with a flat bevel join |
423 | 423 |
424 kJoinCount, | |
425 kDefault_Join = kMiter_Join | 424 kDefault_Join = kMiter_Join |
426 }; | 425 }; |
426 static constexpr int kJoinCount = 3; | |
427 | 427 |
428 /** Return the paint's stroke cap type, controlling how the start and end | 428 /** Return the paint's stroke cap type, controlling how the start and end |
429 of stroked lines and paths are treated. | 429 of stroked lines and paths are treated. |
430 @return the line cap style for the paint, used whenever the paint's | 430 @return the line cap style for the paint, used whenever the paint's |
431 style is Stroke or StrokeAndFill. | 431 style is Stroke or StrokeAndFill. |
432 */ | 432 */ |
433 Cap getStrokeCap() const { return (Cap)fBitfields.fCapType; } | 433 Cap getStrokeCap() const { return (Cap)fBitfields.fCapType; } |
434 | 434 |
435 /** Set the paint's stroke cap type. | 435 /** Set the paint's stroke cap type. |
436 @param cap set the paint's line cap style, used whenever the paint's | 436 @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; | 1170 friend class GrStencilAndCoverTextContext; |
1171 friend class GrPathRendering; | 1171 friend class GrPathRendering; |
1172 friend class GrTextUtils; | 1172 friend class GrTextUtils; |
1173 friend class GrGLPathRendering; | 1173 friend class GrGLPathRendering; |
1174 friend class SkScalerContext; | 1174 friend class SkScalerContext; |
1175 friend class SkTextBaseIter; | 1175 friend class SkTextBaseIter; |
1176 friend class SkCanonicalizePaint; | 1176 friend class SkCanonicalizePaint; |
1177 }; | 1177 }; |
1178 | 1178 |
1179 #endif | 1179 #endif |
OLD | NEW |