1ec3ed6a5ebf6f2c406d7bcf94b6bc34fcaeb976eepoger@google.com
2ec3ed6a5ebf6f2c406d7bcf94b6bc34fcaeb976eepoger@google.com/*
3ec3ed6a5ebf6f2c406d7bcf94b6bc34fcaeb976eepoger@google.com * Copyright 2006 The Android Open Source Project
4ec3ed6a5ebf6f2c406d7bcf94b6bc34fcaeb976eepoger@google.com *
5ec3ed6a5ebf6f2c406d7bcf94b6bc34fcaeb976eepoger@google.com * Use of this source code is governed by a BSD-style license that can be
6ec3ed6a5ebf6f2c406d7bcf94b6bc34fcaeb976eepoger@google.com * found in the LICENSE file.
7ec3ed6a5ebf6f2c406d7bcf94b6bc34fcaeb976eepoger@google.com */
8ec3ed6a5ebf6f2c406d7bcf94b6bc34fcaeb976eepoger@google.com
98a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com
108a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com#ifndef SkDrawTextBox_DEFINED
118a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com#define SkDrawTextBox_DEFINED
128a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com
138a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com#include "SkDrawRectangle.h"
148a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com#include "SkTextBox.h"
158a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com
168a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.comclass SkDrawTextBox : public SkDrawRect {
178a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com    DECLARE_DRAW_MEMBER_INFO(TextBox);
188a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com    SkDrawTextBox();
198a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com
208a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com    // overrides
218a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com    virtual bool draw(SkAnimateMaker& );
228a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com#ifdef SK_DUMP_ENABLED
238a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com    virtual void dump(SkAnimateMaker* );
248a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com#endif
258a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com    virtual bool getProperty(int index, SkScriptValue* value) const;
268a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com    virtual bool setProperty(int index, SkScriptValue& );
278a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com
288a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.comprivate:
298a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com    SkString fText;
308a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com    SkScalar fSpacingMul;
318a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com    SkScalar fSpacingAdd;
328a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com    int /*SkTextBox::Mode*/  mode;
338a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com    int /*SkTextBox::SpacingAlign*/ spacingAlign;
348a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com
358a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com    typedef SkDrawRect INHERITED;
368a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com};
378a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com
388a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com#endif // SkDrawTextBox_DEFINED
39