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 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
391 behavior of miter joins when the joins angle is sharp. This value must | 391 behavior of miter joins when the joins angle is sharp. This value must |
392 be >= 0. | 392 be >= 0. |
393 @param miter set the miter limit on the paint, used whenever the | 393 @param miter set the miter limit on the paint, used whenever the |
394 paint's style is Stroke or StrokeAndFill. | 394 paint's style is Stroke or StrokeAndFill. |
395 */ | 395 */ |
396 void setStrokeMiter(SkScalar miter); | 396 void setStrokeMiter(SkScalar miter); |
397 | 397 |
398 /** Cap enum specifies the settings for the paint's strokecap. This is the | 398 /** Cap enum specifies the settings for the paint's strokecap. This is the |
399 treatment that is applied to the beginning and end of each non-closed | 399 treatment that is applied to the beginning and end of each non-closed |
400 contour (e.g. lines). | 400 contour (e.g. lines). |
| 401 |
| 402 If the cap is round or square, the caps are drawn when the contour has |
| 403 a zero length. Zero length contours can be created by following moveTo |
| 404 with a lineTo at the same point, or a moveTo followed by a close. |
| 405 |
| 406 A dash with an on interval of zero also creates a zero length contour. |
| 407 |
| 408 The zero length contour draws the square cap without rotation, since |
| 409 the no direction can be inferred. |
401 */ | 410 */ |
402 enum Cap { | 411 enum Cap { |
403 kButt_Cap, //!< begin/end contours with no extension | 412 kButt_Cap, //!< begin/end contours with no extension |
404 kRound_Cap, //!< begin/end contours with a semi-circle extension | 413 kRound_Cap, //!< begin/end contours with a semi-circle extension |
405 kSquare_Cap, //!< begin/end contours with a half square extension | 414 kSquare_Cap, //!< begin/end contours with a half square extension |
406 | 415 |
407 kCapCount, | 416 kCapCount, |
408 kDefault_Cap = kButt_Cap | 417 kDefault_Cap = kButt_Cap |
409 }; | 418 }; |
410 | 419 |
(...skipping 678 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1089 friend class GrStencilAndCoverTextContext; | 1098 friend class GrStencilAndCoverTextContext; |
1090 friend class GrPathRendering; | 1099 friend class GrPathRendering; |
1091 friend class GrTextContext; | 1100 friend class GrTextContext; |
1092 friend class GrGLPathRendering; | 1101 friend class GrGLPathRendering; |
1093 friend class SkScalerContext; | 1102 friend class SkScalerContext; |
1094 friend class SkTextToPathIter; | 1103 friend class SkTextToPathIter; |
1095 friend class SkCanonicalizePaint; | 1104 friend class SkCanonicalizePaint; |
1096 }; | 1105 }; |
1097 | 1106 |
1098 #endif | 1107 #endif |
OLD | NEW |