1 #include "SkBGViewArtist.h" 2 #include "SkCanvas.h" 3 #include "SkParsePaint.h" 4 5 SkBGViewArtist::SkBGViewArtist(SkColor c) 6 { 7 fPaint.setColor(c); 8 } 9 10 SkBGViewArtist::~SkBGViewArtist() 11 { 12 } 13 14 void SkBGViewArtist::onDraw(SkView*, SkCanvas* canvas) 15 { 16 // only works for views that are clipped their bounds. 17 canvas->drawPaint(fPaint); 18 } 19 20 void SkBGViewArtist::onInflate(const SkDOM& dom, const SkDOM::Node* node) 21 { 22 SkPaint_Inflate(&fPaint, dom, node); 23 } 24 25