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 "SkDrawDash.h" michael@0: #include "SkDashPathEffect.h" michael@0: michael@0: #if SK_USE_CONDENSED_INFO == 0 michael@0: michael@0: const SkMemberInfo SkDash::fInfo[] = { michael@0: SK_MEMBER_ARRAY(intervals, Float), michael@0: SK_MEMBER(phase, Float) michael@0: }; michael@0: michael@0: #endif michael@0: michael@0: DEFINE_GET_MEMBER(SkDash); michael@0: michael@0: SkDash::SkDash() : phase(0) { michael@0: } michael@0: michael@0: SkDash::~SkDash() { michael@0: } michael@0: michael@0: SkPathEffect* SkDash::getPathEffect() { michael@0: int count = intervals.count(); michael@0: if (count == 0) michael@0: return NULL; michael@0: return SkDashPathEffect::Create(intervals.begin(), count, phase); michael@0: }