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 "SkDrawEmboss.h" michael@0: michael@0: #if SK_USE_CONDENSED_INFO == 0 michael@0: michael@0: const SkMemberInfo SkDrawEmboss::fInfo[] = { michael@0: SK_MEMBER(fAmbient, Float), michael@0: SK_MEMBER_ARRAY(fDirection, Float), michael@0: SK_MEMBER(fSigma, Float), michael@0: SK_MEMBER(fSpecular, Float) michael@0: }; michael@0: michael@0: #endif michael@0: michael@0: DEFINE_GET_MEMBER(SkDrawEmboss); michael@0: michael@0: SkDrawEmboss::SkDrawEmboss() : fSigma(-1) { michael@0: fDirection.setCount(3); michael@0: } michael@0: michael@0: SkMaskFilter* SkDrawEmboss::getMaskFilter() { michael@0: if (fSigma < 0 || fDirection.count() !=3) michael@0: return NULL; michael@0: return SkBlurMaskFilter::CreateEmboss(fSigma, fDirection.begin(), michael@0: fAmbient, fSpecular); michael@0: }