void BrushState::OnTilesetViewRender() { TilesetView* tsv = GetExecutor()->GetTilesetView(); Tileset* ts = GetExecutor()->GetTileset(); int tileWidth = ts->Width() + (tsv->IsPadded() ? 1 : 0); int tileHeight = ts->Height() + (tsv->IsPadded() ? 1 : 0); Rect selected = tsv->GetBrushSelection(); int ywin = tsv->GetYWin(); tsv->DrawSelectRect(selected.left * tileWidth, selected.top * tileHeight - ywin, tileWidth * (selected.Width() + 1), tileHeight * (selected.Height() + 1), RGBA(127, 255, 255)); }
void BrushState::OnMouseDown(wxMouseEvent& event) { int x = event.m_x; int y = event.m_y; GetMapView()->ScreenToTile(x, y); HandleCommand(new PasteBrushCommand(x, y, GetCurLayerIndex(), GetExecutor()->GetCurrentBrush())); }
void BrushState::OnMouseMove(wxMouseEvent& event) { int x = event.m_x; int y = event.m_y; GetMapView()->ScreenToTile(x, y); if (x == _oldX && y == _oldY) { return; } if (event.LeftIsDown()) { HandleCommand(new PasteBrushCommand(x, y, GetCurLayerIndex(), GetExecutor()->GetCurrentBrush())); } _oldX = x; _oldY = y; GetMapView()->Refresh(); }
void CRUEmpCheckTask::PullDataFromExecutor() { inherited::PullDataFromExecutor(); CRUEmpCheckTaskExecutor &taskEx = (CRUEmpCheckTaskExecutor &)GetExecutor(); CRUTbl &tbl = GetTable(); // Copy the emptiness check vector back to the table object CRUEmpCheckVector &empCheckVec = tbl.GetEmpCheckVector(); empCheckVec = taskEx.GetEmpCheckVector(); if (FALSE == tbl.IsInvolvedMV()) { empCheckVec.SetFinal(); // Update the using MVs' delta-def lists tbl.PropagateEmpCheckToUsingMVs(); } }