From 0910916c0f7b951ee55c4b7c6358295b9bca0565 Mon Sep 17 00:00:00 2001 From: The Android Open Source Project Date: Tue, 3 Mar 2009 19:30:35 -0800 Subject: auto import from //depot/cupcake/@135843 --- src/views/SkBGViewArtist.cpp | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 src/views/SkBGViewArtist.cpp (limited to 'src/views/SkBGViewArtist.cpp') diff --git a/src/views/SkBGViewArtist.cpp b/src/views/SkBGViewArtist.cpp new file mode 100644 index 0000000..07da123 --- /dev/null +++ b/src/views/SkBGViewArtist.cpp @@ -0,0 +1,24 @@ +#include "SkBGViewArtist.h" +#include "SkCanvas.h" +#include "SkParsePaint.h" + +SkBGViewArtist::SkBGViewArtist(SkColor c) +{ + fPaint.setColor(c); +} + +SkBGViewArtist::~SkBGViewArtist() +{ +} + +void SkBGViewArtist::onDraw(SkView*, SkCanvas* canvas) +{ + // only works for views that are clipped their bounds. + canvas->drawPaint(fPaint); +} + +void SkBGViewArtist::onInflate(const SkDOM& dom, const SkDOM::Node* node) +{ + SkPaint_Inflate(&fPaint, dom, node); +} + -- cgit v1.1