Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright 2010 Google Inc. | 2 * Copyright 2010 Google Inc. |
| 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 GrContext_DEFINED | 8 #ifndef GrContext_DEFINED |
| 9 #define GrContext_DEFINED | 9 #define GrContext_DEFINED |
| 10 | 10 |
| (...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 393 * the rect is mitered stroked based on strokeWidth. If | 393 * the rect is mitered stroked based on strokeWidth. If |
| 394 * strokeWidth == 0, then the stroke is always a single | 394 * strokeWidth == 0, then the stroke is always a single |
| 395 * pixel thick. | 395 * pixel thick. |
| 396 * @param matrix Optional matrix applied to the rect. Applied before | 396 * @param matrix Optional matrix applied to the rect. Applied before |
| 397 * context's matrix or the paint's matrix. | 397 * context's matrix or the paint's matrix. |
| 398 * The rects coords are used to access the paint (through texture matrix) | 398 * The rects coords are used to access the paint (through texture matrix) |
| 399 */ | 399 */ |
| 400 void drawRect(const GrPaint& paint, | 400 void drawRect(const GrPaint& paint, |
| 401 const SkRect&, | 401 const SkRect&, |
| 402 SkScalar strokeWidth = -1, | 402 SkScalar strokeWidth = -1, |
| 403 const SkMatrix* matrix = NULL); | 403 const SkMatrix* matrix = NULL, |
| 404 bool miterStroke = true); | |
|
bsalomon
2013/09/17 14:40:20
Could we modify this to take an SkStrokeRec rather
yunchao
2013/09/22 08:36:37
Other places also called GrContext::drawRect. If w
bsalomon
2013/09/25 15:26:24
What about
void drawRect(const GrPaint&,
| |
| 404 | 405 |
| 405 /** | 406 /** |
| 406 * Maps a rect of local coordinates onto the a rect of destination | 407 * Maps a rect of local coordinates onto the a rect of destination |
| 407 * coordinates. Each rect can optionally be transformed. The localRect | 408 * coordinates. Each rect can optionally be transformed. The localRect |
| 408 * is stretched over the dstRect. The dstRect is transformed by the | 409 * is stretched over the dstRect. The dstRect is transformed by the |
| 409 * context's matrix. Additional optional matrices for both rects can be | 410 * context's matrix. Additional optional matrices for both rects can be |
| 410 * provided by parameters. | 411 * provided by parameters. |
| 411 * | 412 * |
| 412 * @param paint describes how to color pixels. | 413 * @param paint describes how to color pixels. |
| 413 * @param dstRect the destination rect to draw. | 414 * @param dstRect the destination rect to draw. |
| (...skipping 602 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1016 } | 1017 } |
| 1017 | 1018 |
| 1018 GrTexture* texture() { return fTexture; } | 1019 GrTexture* texture() { return fTexture; } |
| 1019 | 1020 |
| 1020 private: | 1021 private: |
| 1021 GrContext* fContext; | 1022 GrContext* fContext; |
| 1022 GrTexture* fTexture; | 1023 GrTexture* fTexture; |
| 1023 }; | 1024 }; |
| 1024 | 1025 |
| 1025 #endif | 1026 #endif |
| OLD | NEW |