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

Method mouseMoveEvent

outdated/win/Qt3/tileedit.cpp:256–265  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

254}
255
256void TrivialTileEditor::mouseMoveEvent(QMouseEvent* e)
257{
258 QPoint p = imagePoint(e->pos());
259 if ( !img.rect().contains(p) )
260 return;
261 uchar& pixel = img.scanLine(p.y())[p.x()];
262 pixel = penpixel;
263 QPainter painter(this);
264 paintPoint(painter,p);
265}
266
267QPoint TrivialTileEditor::imagePoint(QPoint p) const
268{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected