michael@0: michael@0: /* michael@0: * Copyright 2006 The Android Open Source Project michael@0: * michael@0: * Use of this source code is governed by a BSD-style license that can be michael@0: * found in the LICENSE file. michael@0: */ michael@0: michael@0: michael@0: #include "SkTextOnPath.h" michael@0: #include "SkAnimateMaker.h" michael@0: #include "SkCanvas.h" michael@0: #include "SkDrawPath.h" michael@0: #include "SkDrawText.h" michael@0: #include "SkPaint.h" michael@0: michael@0: #if SK_USE_CONDENSED_INFO == 0 michael@0: michael@0: const SkMemberInfo SkTextOnPath::fInfo[] = { michael@0: SK_MEMBER(offset, Float), michael@0: SK_MEMBER(path, Path), michael@0: SK_MEMBER(text, Text) michael@0: }; michael@0: michael@0: #endif michael@0: michael@0: DEFINE_GET_MEMBER(SkTextOnPath); michael@0: michael@0: SkTextOnPath::SkTextOnPath() : offset(0), path(NULL), text(NULL) { michael@0: } michael@0: michael@0: bool SkTextOnPath::draw(SkAnimateMaker& maker) { michael@0: SkASSERT(text); michael@0: SkASSERT(path); michael@0: SkBoundableAuto boundable(this, maker); michael@0: maker.fCanvas->drawTextOnPathHV(text->getText(), text->getSize(), michael@0: path->getPath(), offset, 0, *maker.fPaint); michael@0: return false; michael@0: }