SkAnimator::DifferenceType diff = fAnim.draw(canvas, &paint, SkTime::GetMSecs());
if (diff == SkAnimator::kDifferent)
- this->inval(nil);
+ this->inval(NULL);
else if (diff == SkAnimator::kPartiallyDifferent)
{
SkRect bounds;
{
if (evt.isType(SK_EventType_Inval))
{
- this->inval(nil);
+ this->inval(NULL);
return true;
}
if (evt.isType("recommendDim"))
SkImageView::SkImageView()
{
- fMatrix = nil;
+ fMatrix = NULL;
fScaleType = kMatrix_ScaleType;
- fData.fAnim = nil; // handles initializing the other union values
+ fData.fAnim = NULL; // handles initializing the other union values
fDataIsAnim = true;
fUriIsValid = false; // an empty string is not valid
{
fScaleType = SkToU8(st);
if (fUriIsValid)
- this->inval(nil);
+ this->inval(NULL);
}
}
if (matrix && !matrix->isIdentity())
{
- if (fMatrix == nil)
+ if (fMatrix == NULL)
fMatrix = (SkMatrix*)sk_malloc_throw(sizeof(SkMatrix));
*fMatrix = *matrix;
changed = true;
{
SkASSERT(!fMatrix->isIdentity());
sk_free(fMatrix);
- fMatrix = nil;
+ fMatrix = NULL;
changed = true;
}
}
// only redraw if we changed our matrix and we're not in scaleToFit mode
if (changed && this->getScaleType() == kMatrix_ScaleType && fUriIsValid)
- this->inval(nil);
+ this->inval(NULL);
}
///////////////////////////////////////////////////////////////////////////////////////////////
if (evt.isType(SK_EventType_Inval))
{
if (fUriIsValid)
- this->inval(nil);
+ this->inval(NULL);
return true;
}
return this->INHERITED::onEvent(evt);
SkDEBUGF(("SkImageView : now = %X[%12.3f], diff = %d\n", now, now/1000., diff));
if (diff == SkAnimator::kDifferent)
- this->inval(nil);
+ this->inval(NULL);
else if (diff == SkAnimator::kPartiallyDifferent)
{
SkRect bounds;
void SkImageView::onUriChange()
{
if (this->freeData())
- this->inval(nil);
+ this->inval(NULL);
fUriIsValid = true; // give ensureUriIsLoaded() a shot at the new uri
}
else
delete fData.fBitmap;
- fData.fAnim = nil; // valid for all union values
+ fData.fAnim = NULL; // valid for all union values
return true;
}
return false;
SkEvent* SkListSource::getEvent(int index)
{
- return nil;
+ return NULL;
}
#include "SkOSFile.h"
{
fCount = 0;
fIter.reset(fPath.c_str(), fSuffix.c_str());
- while (fIter.next(nil))
+ while (fIter.next(NULL))
fCount += 1;
fIter.reset(fPath.c_str(), fSuffix.c_str());
fIndex = 0;
while (fIndex < index)
{
- fIter.next(nil);
+ fIter.next(NULL);
fIndex += 1;
}
SkEvent* evt = new SkEvent();
SkString label;
- this->getRow(index, &label, nil);
+ this->getRow(index, &label, NULL);
evt->setString("name", label.c_str());
int c = fPath.c_str()[fPath.size() - 1];
}
fCount = count;
- fList = nil;
+ fList = NULL;
if (count)
{
ItemRec* rec = fList = new ItemRec[count];
if (fList[index].fType == kToggle_Type)
fList[index].fTail.swap(fList[index].fAltTail);
- return nil;
+ return NULL;
}
private:
SkListView::SkListView(U32 flags) : SkWidgetView(flags)
{
- fSource = nil;
+ fSource = NULL;
fScrollIndex = 0;
fCurrIndex = -1;
fRowHeight = SkIntToScalar(16);
fVisibleRowCount = 0;
- fStrCache = nil;
+ fStrCache = NULL;
fPaint[kBG_Attr].setColor(0);
fPaint[kNormalText_Attr].setTextSize(SkIntToScalar(14));
if (fRowHeight != height)
{
fRowHeight = height;
- this->inval(nil);
+ this->inval(NULL);
this->onSizeChange();
}
}
void SkListView::ensureSelectionIsVisible()
{
- if (fSource == nil)
+ if (fSource == NULL)
return;
if ((unsigned)fCurrIndex < (unsigned)fSource->countRows())
SkASSERT((unsigned)fScrollIndex < (unsigned)fSource->countRows());
this->dirtyStrCache();
- this->inval(nil);
+ this->inval(NULL);
}
}
}
SkRefCnt_SafeAssign(fSource, src);
this->dirtyStrCache();
this->ensureSelectionIsVisible();
- this->inval(nil);
+ this->inval(NULL);
}
return src;
}
{
SkScalar ascent, descent;
- fPaint[kNormalText_Attr].measureText(0, nil, &ascent, &descent);
+ fPaint[kNormalText_Attr].measureText(0, NULL, &ascent, &descent);
y = SkScalarHalf(fRowHeight - descent + ascent) - ascent;
}
if (fStrCache)
{
delete[] fStrCache;
- fStrCache = nil;
+ fStrCache = NULL;
}
}
void SkListView::ensureStrCache(int count)
{
- if (fStrCache == nil)
+ if (fStrCache == NULL)
{
fStrCache = new SkString[count << 1];
{
SkView* view = this->sendEventToParents(*evt);
delete evt;
- return view != nil;
+ return view != NULL;
}
else // hack to make toggle work
{
this->dirtyStrCache();
- this->inval(nil);
+ this->inval(NULL);
}
}
break;
if (dom.findScalar(node, "row-height", &x))
this->setRowHeight(x);
- if ((child = dom.getFirstChild(node, "hilite-paint")) != nil)
+ if ((child = dom.getFirstChild(node, "hilite-paint")) != NULL)
SkPaint_Inflate(&this->paint(kHiliteCell_Attr), dom, child);
// look for a listsource
{
- SkListSource* src = nil;
+ SkListSource* src = NULL;
- if ((child = dom.getFirstChild(node, "file-listsource")) != nil)
+ if ((child = dom.getFirstChild(node, "file-listsource")) != NULL)
{
const char* path = dom.findAttr(child, "path");
if (path)
dom.findAttr(child, "filter"),
dom.findAttr(child, "target"));
}
- else if ((child = dom.getFirstChild(node, "xml-listsource")) != nil)
+ else if ((child = dom.getFirstChild(node, "xml-listsource")) != NULL)
{
src = SkListSource::CreateFromDOM(dom, child);
}
protected:
virtual void onDraw(SkCanvas* canvas)
{
- if (fBGRef == nil) return;
+ if (fBGRef == NULL) return;
SkPaint paint;
SkGridView::SkGridView(U32 flags) : SkWidgetView(flags)
{
- fSource = nil;
+ fSource = NULL;
fCurrIndex = -1;
fVisibleCount.set(0, 0);
if (!fCellSize.equals(x, y))
{
fCellSize.set(x, y);
- this->inval(nil);
+ this->inval(NULL);
}
}
void SkGridView::ensureSelectionIsVisible()
{
- if (fSource == nil)
+ if (fSource == NULL)
return;
#if 0
if ((unsigned)fCurrIndex < (unsigned)fSource->countRows())
SkASSERT((unsigned)fScrollIndex < (unsigned)fSource->countRows());
this->dirtyStrCache();
- this->inval(nil);
+ this->inval(NULL);
}
}
#endif
SkRefCnt_SafeAssign(fSource, src);
// this->dirtyStrCache();
this->ensureSelectionIsVisible();
- this->inval(nil);
+ this->inval(NULL);
}
return src;
}
canvas->drawPaint(fPaint[kBG_Attr]);
- if (fSource == nil)
+ if (fSource == NULL)
return;
#if 0
delete evt;
SkBitmapRef* bmr = SkBitmapRef::Decode(path.c_str(), false);
- if (bmr == nil)
+ if (bmr == NULL)
{
bmr = SkBitmapRef::Decode(path.c_str(), true);
if (bmr)
// only draw one forced bitmap at a time
if (forced)
{
- this->inval(nil); // could inval only the remaining visible cells...
+ this->inval(NULL); // could inval only the remaining visible cells...
break;
}
}
if (evt)
{
// augment the event with our local rect
- (void)this->getCellRect(fCurrIndex, (SkRect*)evt->setScalars("local-rect", 4, nil));
+ (void)this->getCellRect(fCurrIndex, (SkRect*)evt->setScalars("local-rect", 4, NULL));
SkView* view = this->sendEventToParents(*evt);
delete evt;
- return view != nil;
+ return view != NULL;
}
}
break;
if (dom.findScalars(node, "cell-size", x, 2))
this->setCellSize(x[0], x[1]);
- if ((child = dom.getFirstChild(node, "hilite-paint")) != nil)
+ if ((child = dom.getFirstChild(node, "hilite-paint")) != NULL)
SkPaint_Inflate(&this->paint(kHiliteCell_Attr), dom, child);
// look for a listsource
{
- SkListSource* src = nil;
+ SkListSource* src = NULL;
- if ((child = dom.getFirstChild(node, "file-listsource")) != nil)
+ if ((child = dom.getFirstChild(node, "file-listsource")) != NULL)
{
const char* path = dom.findAttr(child, "path");
if (path)
dom.findAttr(child, "filter"),
dom.findAttr(child, "target"));
}
- else if ((child = dom.getFirstChild(node, "xml-listsource")) != nil)
+ else if ((child = dom.getFirstChild(node, "xml-listsource")) != NULL)
{
src = SkListSource::CreateFromDOM(dom, child);
}
SkListView::SkListView()
{
- fSource = nil; // our list-source
- fScrollBar = nil;
- fAnims = nil; // array of animators[fVisibleRowCount]
- fBindings = nil; // our fields->slot array
+ fSource = NULL; // our list-source
+ fScrollBar = NULL;
+ fAnims = NULL; // array of animators[fVisibleRowCount]
+ fBindings = NULL; // our fields->slot array
fBindingCount = 0; // number of entries in fSlots array
fScrollIndex = 0; // number of cells to skip before first visible cell
fCurrIndex = -1; // index of "selected" cell
{
if (hasSB)
{
- SkASSERT(fScrollBar == nil);
+ SkASSERT(fScrollBar == NULL);
fScrollBar = (SkScrollBarView*)SkWidgetFactory(kScroll_WidgetEnum);
fScrollBar->setVisibleP(true);
this->attachChildToFront(fScrollBar);
SkASSERT(fScrollBar);
fScrollBar->detachFromParent();
fScrollBar->unref();
- fScrollBar = nil;
+ fScrollBar = NULL;
}
this->dirtyCache(kAnimContent_DirtyFlag);
}
if (fCurrIndex != index)
{
fAnimFocusDirty = true;
- this->inval(nil);
+ this->inval(NULL);
this->invalSelection();
fCurrIndex = index;
else
newIndex = fCurrIndex - fVisibleRowCount + 1;
SkASSERT((unsigned)newIndex < (unsigned)fSource->countRecords());
- this->inval(nil);
+ this->inval(NULL);
if (fScrollIndex != newIndex)
{
{
SkRefCnt_SafeAssign(fSource, src);
this->ensureSelectionIsVisible();
- this->inval(nil);
+ this->inval(NULL);
if (fScrollBar)
fScrollBar->setTotal(fSource->countRecords());
if (dirtyFlags & kAnimCount_DirtyFlag)
{
delete fAnims;
- fAnims = nil;
+ fAnims = NULL;
fAnimContentDirty = true;
fAnimFocusDirty = true;
}
{
if (!fAnimContentDirty)
{
- this->inval(nil);
+ this->inval(NULL);
fAnimContentDirty = true;
}
fAnimFocusDirty = true;
if (fSkinName.size() == 0)
return false;
- if (fAnims == nil)
+ if (fAnims == NULL)
{
int n = SkMax32(1, fVisibleRowCount);
const SkDOM::Node* child;
- if ((child = dom.getFirstChild(node, "bindings")) != nil)
+ if ((child = dom.getFirstChild(node, "bindings")) != NULL)
{
delete[] fBindings;
- fBindings = nil;
+ fBindings = NULL;
fBindingCount = 0;
SkListSource* listSrc = SkListSource::Factory(dom.findAttr(child, "data-fields"));
if (fBindings[count].fFieldIndex >= 0)
fBindings[count++].fSlotName.set(slotName);
}
- } while ((child = dom.getNextSibling(child, "bind")) != nil);
+ } while ((child = dom.getNextSibling(child, "bind")) != NULL);
fBindingCount = SkToU16(count);
if (count == 0)
SkXMLListSource::SkXMLListSource(const char doc[], size_t len)
{
fFieldCount = fRecordCount = 0;
- fFields = fRecords = nil;
+ fFields = fRecords = NULL;
SkDOM dom;
{
if (gInited == false)
{
- gWave.hwo = nil;
+ gWave.hwo = NULL;
gWavePaused = false;
gVolume = 0x80;
gInited = true;
{
init_wave();
- if (gWave.hwo != nil)
+ if (gWave.hwo != NULL)
SkOSSound::Stop();
U32 v32 = (gVolume << 8) | gVolume; // fill it out to 16bits
{
init_wave();
- if (gWave.hwo == nil || (gWave.whdr.dwFlags & WHDR_DONE))
+ if (gWave.hwo == NULL || (gWave.whdr.dwFlags & WHDR_DONE))
return;
waveOutPause(gWave.hwo);
gWavePaused = true;
{
init_wave();
- if (gWave.hwo == nil || (gWave.whdr.dwFlags & WHDR_DONE))
+ if (gWave.hwo == NULL || (gWave.whdr.dwFlags & WHDR_DONE))
return;
waveOutRestart(gWave.hwo);
gWavePaused = false;
{
init_wave();
-// if (gWave.hwo == nil || (gWave.whdr.dwFlags & WHDR_DONE))
- if (gWave.hwo == nil)
+// if (gWave.hwo == NULL || (gWave.whdr.dwFlags & WHDR_DONE))
+ if (gWave.hwo == NULL)
return;
waveOutReset(gWave.hwo);
EndWave(&gWave);
gWavePaused = false;
- gWave.hwo = nil;
+ gWave.hwo = NULL;
}
U8 SkOSSound::GetVolume()
#if 0
unsigned long SoundManager::GetPosition()
{
- if (fWave.hwo == nil)
+ if (fWave.hwo == NULL)
return 0;
MMTIME time;
time.wType = TIME_MS;
MMRESULT StartWave(const char path[], SkOSSoundWave* wave, U32 vol)
{
- HWAVEOUT hwo = nil;
+ HWAVEOUT hwo = NULL;
// WAVEHDR whdr;
MMRESULT mmres = 0;
// CWaveFile waveFile;
static SkShader* inflate_shader(const SkDOM& dom, const SkDOM::Node* node)
{
- if ((node = dom.getFirstChild(node, "shader")) == nil)
- return nil;
+ if ((node = dom.getFirstChild(node, "shader")) == NULL)
+ return NULL;
const char* str;
SkPoint pts[2];
colors[0] = colors[1] = SK_ColorBLACK; // need to initialized the alpha to opaque, since FindColor doesn't set it
- if ((str = dom.findAttr(node, "c0")) != nil &&
+ if ((str = dom.findAttr(node, "c0")) != NULL &&
SkParse::FindColor(str, &colors[0]) &&
- (str = dom.findAttr(node, "c1")) != nil &&
+ (str = dom.findAttr(node, "c1")) != NULL &&
SkParse::FindColor(str, &colors[1]) &&
dom.findScalars(node, "p0", &pts[0].fX, 2) &&
dom.findScalars(node, "p1", &pts[1].fX, 2))
if ((index = dom.findList(node, "tile-mode", "clamp,repeat,mirror")) >= 0)
mode = (SkShader::TileMode)index;
- return SkGradientShader::CreateLinear(pts, colors, nil, 2, mode);
+ return SkGradientShader::CreateLinear(pts, colors, NULL, 2, mode);
}
}
else if (dom.hasAttr(node, "type", "bitmap"))
{
- if ((str = dom.findAttr(node, "src")) == nil)
- return nil;
+ if ((str = dom.findAttr(node, "src")) == NULL)
+ return NULL;
SkBitmap bm;
return SkShader::CreateBitmapShader(bm, mode, mode);
}
}
- return nil;
+ return NULL;
}
void SkPaint_Inflate(SkPaint* paint, const SkDOM& dom, const SkDOM::Node* node)
SkAnimator::DifferenceType diff = fAnim.draw(canvas, &paint, SkTime::GetMSecs());
if (diff == SkAnimator::kDifferent)
- this->inval(nil);
+ this->inval(NULL);
else if (diff == SkAnimator::kPartiallyDifferent)
{
SkRect bounds;
{
if (evt.isType(SK_EventType_Inval))
{
- this->inval(nil);
+ this->inval(NULL);
return true;
}
if (evt.isType("recommendDim"))
{
U8 alpha = paint.getAlpha();
SkScalar above, below;
- (void)paint.measureText(nil, 0, &above, &below);
+ (void)paint.measureText(NULL, 0, &above, &below);
SkScalar height = below - above;
SkScalar dy = SkScalarMul(height, scale);
if (scale < 0)
SkInterpolator fInterp;
};
-SkTextView::SkTextView(U32 flags) : SkView(flags), fInterp(nil), fDoInterp(false)
+SkTextView::SkTextView(U32 flags) : SkView(flags), fInterp(NULL), fDoInterp(false)
{
fMargin.set(0, 0);
}
fInterp = new Interp(fText, SkTime::GetMSecs(), 500, dir);
}
fText = src;
- this->inval(nil);
+ this->inval(NULL);
}
/////////////////////////////////////////////////////////////////
if (fMargin != margin)
{
fMargin = margin;
- this->inval(nil);
+ this->inval(NULL);
}
}
break;
}
- fPaint.measureText(nil, 0, &y, nil);
+ fPaint.measureText(NULL, 0, &y, NULL);
y = fMargin.fY - y;
if (fInterp)
{
if (fInterp->draw(canvas, fText, x, y, fPaint))
- this->inval(nil);
+ this->inval(NULL);
else
{
delete fInterp;
- fInterp = nil;
+ fInterp = NULL;
}
}
else
{
fMax = SkToU16(max);
if (fValue > 0)
- this->inval(nil);
+ this->inval(NULL);
}
}
fValue = SkToU16(value);
if (prev != next)
{
- this->inval(nil);
+ this->inval(NULL);
if (this->hasListeners())
{
colors[0] = SK_ColorBLUE;
colors[1] = SK_ColorWHITE;
- paint->setShader(SkGradientShader::CreateLinear(pts, colors, nil, 2, SkShader::kMirror_TileMode))->unref();
+ paint->setShader(SkGradientShader::CreateLinear(pts, colors, NULL, 2, SkShader::kMirror_TileMode))->unref();
}
void SkSliderView::onDraw(SkCanvas* canvas)
void SkWidgetView::setLabel(const char label[], size_t len)
{
- if (label == nil && fLabel.size() != 0 || !fLabel.equals(label, len))
+ if (label == NULL && fLabel.size() != 0 || !fLabel.equals(label, len))
{
SkString tmp(label, len);
if (label)
this->setLabel(label);
- if ((node = dom.getFirstChild(node, "event")) != nil)
+ if ((node = dom.getFirstChild(node, "event")) != NULL)
fEvent.inflate(dom, node);
}
/*virtual*/ void SkWidgetView::onLabelChange(const char oldLabel[], const char newLabel[])
{
- this->inval(nil);
+ this->inval(NULL);
}
static const char gWidgetEventSinkIDSlotName[] = "sk-widget-sinkid-slot";
/*virtual*/ void SkCheckButtonView::onCheckStateChange(CheckState oldState, CheckState newState)
{
- this->inval(nil);
+ this->inval(NULL);
}
/*virtual*/ void SkCheckButtonView::onInflate(const SkDOM& dom, const SkDOM::Node* node)
SkAnimator::DifferenceType diff = fAnim.draw(canvas, &paint, SkTime::GetMSecs());
if (diff == SkAnimator::kDifferent)
- this->inval(nil);
+ this->inval(NULL);
else if (diff == SkAnimator::kPartiallyDifferent)
{
SkRect bounds;
{
if (evt.isType(SK_EventType_Inval))
{
- this->inval(nil);
+ this->inval(NULL);
return true;
}
if (evt.isType("recommendDim"))
void SkStaticTextView::setSpacingAlign(SkTextBox::SpacingAlign align)
{
fSpacingAlign = SkToU8(align);
- this->inval(nil);
+ this->inval(NULL);
}
void SkStaticTextView::getMargin(SkPoint* margin) const
{
fMargin.set(dx, dy);
this->computeSize();
- this->inval(nil);
+ this->inval(NULL);
}
}
void SkStaticTextView::setText(const char text[])
{
- if (text == nil)
+ if (text == NULL)
text = "";
this->setText(text, strlen(text));
}
{
fText.set(text, len);
this->computeSize();
- this->inval(nil);
+ this->inval(NULL);
}
}
{
fPaint = paint;
this->computeSize();
- this->inval(nil);
+ this->inval(NULL);
}
}
if (text)
this->setText(text);
- if ((node = dom.getFirstChild(node, "paint")) != nil &&
- (node = dom.getFirstChild(node, "screenplay")) != nil)
+ if ((node = dom.getFirstChild(node, "paint")) != NULL &&
+ (node = dom.getFirstChild(node, "screenplay")) != NULL)
{
inflate_paint(dom, node, &fPaint);
}
SkView* SkWidgetFactory(const char name[])
{
- if (name == nil)
- return nil;
+ if (name == NULL)
+ return NULL;
// must be in the same order as the SkSkinWidgetEnum is declared
static const char* gNames[] = {
if (!strcmp(gNames[i], name))
return SkWidgetFactory((SkWidgetEnum)i);
- return nil;
+ return NULL;
}
#include "SkImageView.h"
SkASSERT(!"unknown enum passed to SkWidgetFactory");
break;
}
- return nil;
+ return NULL;
}
if (!fAnimators[i]->decodeURI(path.c_str()))
{
delete fAnimators[i];
- fAnimators[i] = nil;
+ fAnimators[i] = NULL;
}
}
}
static SkAnimator* get_skin_animator(SkinType st)
{
#if 0
- if (gSkinSuite == nil)
+ if (gSkinSuite == NULL)
gSkinSuite = new SkinSuite;
return gSkinSuite->get(st);
#else
- return nil;
+ return NULL;
#endif
}
void SkWidget::onEnabledChange()
{
- this->inval(nil);
+ this->inval(NULL);
}
void SkWidget::postWidgetEvent()
{
this->INHERITED::onInflate(dom, node);
- if ((node = dom.getFirstChild(node, "event")) != nil)
+ if ((node = dom.getFirstChild(node, "event")) != NULL)
fEvent.inflate(dom, node);
}
void SkButtonWidget::onButtonStateChange()
{
- this->inval(nil);
+ this->inval(NULL);
}
void SkButtonWidget::onInflate(const SkDOM& dom, const SkDOM::Node* node)
p.setColor(SK_ColorBLUE);
create_emboss(&p, SkIntToScalar(12)/5, this->hasFocus(), this->getButtonState() == kOn_State);
canvas->drawRoundRect(r, SkScalarHalf(this->height()), SkScalarHalf(this->height()), p);
- p.setMaskFilter(nil);
+ p.setMaskFilter(NULL);
p.setTextAlign(SkPaint::kCenter_Align);
{
if (fMode == kAutoWidth_Mode)
{
- SkScalar width = fPaint.measureText(fText.c_str(), fText.size(), nil, nil);
+ SkScalar width = fPaint.measureText(fText.c_str(), fText.size(), NULL, NULL);
this->setWidth(width + fMargin.fX * 2);
}
else if (fMode == kAutoHeight_Mode)
int lines = width > 0 ? SkTextLineBreaker::CountLines(fText.c_str(), fText.size(), fPaint, width) : 0;
SkScalar before, after;
- (void)fPaint.measureText(0, nil, &before, &after);
+ (void)fPaint.measureText(0, NULL, &before, &after);
this->setHeight(lines * (after - before) + fMargin.fY * 2);
}
void SkStaticTextView::setSpacingAlign(SkTextBox::SpacingAlign align)
{
fSpacingAlign = SkToU8(align);
- this->inval(nil);
+ this->inval(NULL);
}
void SkStaticTextView::getMargin(SkPoint* margin) const
{
fMargin.set(dx, dy);
this->computeSize();
- this->inval(nil);
+ this->inval(NULL);
}
}
{
fText.set(text, len);
this->computeSize();
- this->inval(nil);
+ this->inval(NULL);
}
}
{
fPaint = paint;
this->computeSize();
- this->inval(nil);
+ this->inval(NULL);
}
}
if (text)
this->setText(text);
- if ((node = dom.getFirstChild(node, "paint")) != nil)
+ if ((node = dom.getFirstChild(node, "paint")) != NULL)
SkPaint_Inflate(&fPaint, dom, node);
}