MCPcopy Create free account
hub / github.com/NetHack/NetHack / fill

Method fill

outdated/win/Qt3/tileedit.cpp:236–249  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

234}
235
236void TrivialTileEditor::fill(QPainter& painter, QPoint p, uchar from)
237{
238 if ( img.rect().contains(p) ) {
239 uchar& pixel = img.scanLine(p.y())[p.x()];
240 if ( pixel == from ) {
241 pixel = penpixel;
242 paintPoint(painter,p);
243 fill(painter, p+QPoint(-1,0), from);
244 fill(painter, p+QPoint(+1,0), from);
245 fill(painter, p+QPoint(0,-1), from);
246 fill(painter, p+QPoint(0,+1), from);
247 }
248 }
249}
250
251void TrivialTileEditor::mouseReleaseEvent(QMouseEvent* e)
252{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected