CSeedfillDoc* pDoc = GetDocument(); ASSERT_VALID(pDoc);
// TODO: add draw code for native data
}
}
here
DrawRectangle(pDC); }
void CSeedfillView::seed(int x,int y,int fillcolor,int oldcolor,CDC* pDC) { }
void CSeedfillView::DrawRectangle(CDC* pDC) {
///////////////////////////////////////////////////////////////////////////// // CSeedfillView printing BOOL
CSeedfillView::OnPreparePrinting(CPrintInfo* pInfo) { }
void CSeedfillView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/) {
pDC->SetPixelV(x,y,fillcolor);
} void {
// TODO: add cleanup after printing }
///////////////////////////////////////////////////////////////////////////// // CSeedfillView diagnostics
#ifdef _DEBUG
void CSeedfillView::AssertValid() const { }
void CSeedfillView::Dump(CDumpContext& dc) const { }
CView::Dump(dc); CView::AssertValid();
CSeedfillView::OnEndPrinting(CDC* // TODO: add extra initialization before printing
// default preparation
return DoPreparePrinting(pInfo);
seed(210,210,(255,0,0),(225,255,225
),pDC);
int ccolor;
ccolor = pDC->GetPixel(x,y); if(ccolor!=oldcolor&&ccolor!=fillco{
lor)
seed(x+1,y,fillcolor,oldcolor,pDC); seed(x-1,y,fillcolor,oldcolor,pDC); seed(x,y+1,fillcolor,oldcolor,pDC); seed(x,y-1,fillcolor,oldcolor,pDC); }
/*pDC*/, CPrintInfo* /*pInfo*/)
for(int i=200;i<=300;i++) {
pDC->SetPixelV(200,i,RGB(0,0,0)); pDC->SetPixelV(300,i,RGB(0,0,0)); pDC->SetPixelV(i,200,RGB(0,0,0));