1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/gfx/skia/trunk/src/views/SkBGViewArtist.cpp Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,30 @@ 1.4 + 1.5 +/* 1.6 + * Copyright 2011 Google Inc. 1.7 + * 1.8 + * Use of this source code is governed by a BSD-style license that can be 1.9 + * found in the LICENSE file. 1.10 + */ 1.11 +#include "SkBGViewArtist.h" 1.12 +#include "SkCanvas.h" 1.13 +#include "SkParsePaint.h" 1.14 + 1.15 +SkBGViewArtist::SkBGViewArtist(SkColor c) 1.16 +{ 1.17 + fPaint.setColor(c); 1.18 +} 1.19 + 1.20 +SkBGViewArtist::~SkBGViewArtist() 1.21 +{ 1.22 +} 1.23 + 1.24 +void SkBGViewArtist::onDraw(SkView*, SkCanvas* canvas) 1.25 +{ 1.26 + // only works for views that are clipped their bounds. 1.27 + canvas->drawPaint(fPaint); 1.28 +} 1.29 + 1.30 +void SkBGViewArtist::onInflate(const SkDOM& dom, const SkDOM::Node* node) 1.31 +{ 1.32 + SkPaint_Inflate(&fPaint, dom, node); 1.33 +}