michael@0: michael@0: /* michael@0: * Copyright 2011 Google Inc. 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: #include "SkBGViewArtist.h" michael@0: #include "SkCanvas.h" michael@0: #include "SkParsePaint.h" michael@0: michael@0: SkBGViewArtist::SkBGViewArtist(SkColor c) michael@0: { michael@0: fPaint.setColor(c); michael@0: } michael@0: michael@0: SkBGViewArtist::~SkBGViewArtist() michael@0: { michael@0: } michael@0: michael@0: void SkBGViewArtist::onDraw(SkView*, SkCanvas* canvas) michael@0: { michael@0: // only works for views that are clipped their bounds. michael@0: canvas->drawPaint(fPaint); michael@0: } michael@0: michael@0: void SkBGViewArtist::onInflate(const SkDOM& dom, const SkDOM::Node* node) michael@0: { michael@0: SkPaint_Inflate(&fPaint, dom, node); michael@0: }