Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(258)

Side by Side Diff: include/gpu/GrContext.h

Issue 23712005: Add bevel-stroke support in GrAARectRenderer (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 372 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 GrRenderTarget* target = NULL); 383 GrRenderTarget* target = NULL);
384 384
385 /** 385 /**
386 * Draw everywhere (respecting the clip) with the paint. 386 * Draw everywhere (respecting the clip) with the paint.
387 */ 387 */
388 void drawPaint(const GrPaint& paint); 388 void drawPaint(const GrPaint& paint);
389 389
390 /** 390 /**
391 * Draw the rect using a paint. 391 * Draw the rect using a paint.
392 * @param paint describes how to color pixels. 392 * @param paint describes how to color pixels.
393 * @param strokeWidth If strokeWidth < 0, then the rect is filled, else 393 * @param stroke the stroke information (width, join, cap).
394 * the rect is mitered stroked based on strokeWidth. If 394 * If stroke == NULL, then the rect is filled.
395 * strokeWidth == 0, then the stroke is always a single 395 * Otherwise, if stroke width == 0, then the stroke
396 * pixel thick. 396 * is always a single pixel thick, else the rect is
397 * mitered/beveled stroked based on stroke width.
397 * @param matrix Optional matrix applied to the rect. Applied before 398 * @param matrix Optional matrix applied to the rect. Applied before
398 * context's matrix or the paint's matrix. 399 * context's matrix or the paint's matrix.
399 * The rects coords are used to access the paint (through texture matrix) 400 * The rects coords are used to access the paint (through texture matrix)
400 */ 401 */
401 void drawRect(const GrPaint& paint, 402 void drawRect(const GrPaint& paint,
402 const SkRect&, 403 const SkRect&,
403 SkScalar strokeWidth = -1, 404 const SkStrokeRec* stroke = NULL,
404 const SkMatrix* matrix = NULL); 405 const SkMatrix* matrix = NULL);
405 406
406 /** 407 /**
407 * Maps a rect of local coordinates onto the a rect of destination 408 * Maps a rect of local coordinates onto the a rect of destination
408 * coordinates. Each rect can optionally be transformed. The localRect 409 * coordinates. Each rect can optionally be transformed. The localRect
409 * is stretched over the dstRect. The dstRect is transformed by the 410 * is stretched over the dstRect. The dstRect is transformed by the
410 * context's matrix. Additional optional matrices for both rects can be 411 * context's matrix. Additional optional matrices for both rects can be
411 * provided by parameters. 412 * provided by parameters.
412 * 413 *
413 * @param paint describes how to color pixels. 414 * @param paint describes how to color pixels.
(...skipping 611 matching lines...) Expand 10 before | Expand all | Expand 10 after
1025 } 1026 }
1026 1027
1027 GrTexture* texture() { return fTexture; } 1028 GrTexture* texture() { return fTexture; }
1028 1029
1029 private: 1030 private:
1030 GrContext* fContext; 1031 GrContext* fContext;
1031 GrTexture* fTexture; 1032 GrTexture* fTexture;
1032 }; 1033 };
1033 1034
1034 #endif 1035 #endif
OLDNEW
« no previous file with comments | « gm/rects.cpp ('k') | src/gpu/GrAARectRenderer.h » ('j') | src/gpu/GrAARectRenderer.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698