blob: 7e46dac1f860d2f3870856b647886f59df24c56b [file] [log] [blame]
commit-bot@chromium.org81312832013-03-22 18:34:09 +00001/*
2 * Copyright 2013 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8
9#ifndef GrOvalRenderer_DEFINED
10#define GrOvalRenderer_DEFINED
11
12#include "GrContext.h"
13#include "GrPaint.h"
14#include "GrRefCnt.h"
15#include "GrRect.h"
16
17class GrContext;
18class GrDrawTarget;
19class GrPaint;
20class SkStrokeRec;
21
22/*
23 * This class wraps helper functions that draw ovals (filled & stroked)
24 */
25class GrOvalRenderer : public GrRefCnt {
26public:
27 SK_DECLARE_INST_COUNT(GrOvalRenderer)
28
29 GrOvalRenderer() {}
30
31 ~GrOvalRenderer() {}
32
skia.committer@gmail.com7e328512013-03-23 07:01:28 +000033 bool drawOval(GrDrawTarget* target, const GrContext* context, const GrPaint& paint,
commit-bot@chromium.org81312832013-03-22 18:34:09 +000034 const GrRect& oval, const SkStrokeRec& stroke);
35private:
jvanverth@google.comc4f2eca2013-04-16 12:30:35 +000036 bool drawEllipse(GrDrawTarget* target, const GrPaint& paint,
commit-bot@chromium.org81312832013-03-22 18:34:09 +000037 const GrRect& ellipse,
38 const SkStrokeRec& stroke);
39 void drawCircle(GrDrawTarget* target, const GrPaint& paint,
40 const GrRect& circle,
41 const SkStrokeRec& stroke);
42
43 typedef GrRefCnt INHERITED;
44};
45
46#endif // GrOvalRenderer_DEFINED