c7a40fad0b
This is a stepping stone to having a variety of different text context types (bitmaps, distance fields, NV path rendering). R=bsalomon@google.com Review URL: https://codereview.chromium.org/27199002 git-svn-id: http://skia.googlecode.com/svn/trunk@11820 2bbb7eff-a529-9590-31e7-b0007b416f81
41 lines
818 B
C++
41 lines
818 B
C++
/*
|
|
* Copyright 2010 Google Inc.
|
|
*
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
* found in the LICENSE file.
|
|
*/
|
|
|
|
#ifndef GrTextContext_DEFINED
|
|
#define GrTextContext_DEFINED
|
|
|
|
#include "GrContext.h"
|
|
#include "GrGlyph.h"
|
|
#include "GrPaint.h"
|
|
|
|
class GrContext;
|
|
class GrDrawTarget;
|
|
class GrFontScaler;
|
|
|
|
/*
|
|
* This class wraps the state for a single text render
|
|
*/
|
|
class GrTextContext {
|
|
public:
|
|
virtual void drawPackedGlyph(GrGlyph::PackedID, GrFixed left, GrFixed top,
|
|
GrFontScaler*) = 0;
|
|
|
|
protected:
|
|
GrTextContext(GrContext*, const GrPaint&);
|
|
virtual ~GrTextContext() {}
|
|
|
|
GrPaint fPaint;
|
|
GrContext* fContext;
|
|
GrDrawTarget* fDrawTarget;
|
|
|
|
SkIRect fClipRect;
|
|
|
|
private:
|
|
};
|
|
|
|
#endif
|