• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright 2010 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 #ifndef GrTextContext_DEFINED
9 #define GrTextContext_DEFINED
10 
11 #include "GrContext.h"
12 #include "GrGlyph.h"
13 #include "GrPaint.h"
14 
15 class GrContext;
16 class GrDrawTarget;
17 class GrFontScaler;
18 
19 /*
20  * This class wraps the state for a single text render
21  */
22 class GrTextContext {
23 public:
24     virtual void drawPackedGlyph(GrGlyph::PackedID, GrFixed left, GrFixed top,
25                                  GrFontScaler*) = 0;
26 
27 protected:
28     GrTextContext(GrContext*, const GrPaint&);
~GrTextContext()29     virtual ~GrTextContext() {}
30 
31     GrPaint                fPaint;
32     GrContext*             fContext;
33     GrDrawTarget*          fDrawTarget;
34 
35     SkIRect                fClipRect;
36 
37 private:
38 };
39 
40 #endif
41