mirror of
https://github.com/reactos/reactos.git
synced 2025-08-06 16:03:00 +00:00
[MSPAINT] Implement canvas rotation (#4360)
- Add Rotate90DegreeBlt function to dib.cpp. - Implement ImageModel::RotateNTimes90Degrees and SelectionModel::RotateNTimes90Degrees. - Improve ToolsModel::SetBackgroundTransparent. - Extend and improve SelectionModel::InsertFromHBITMAP. CORE-16634
This commit is contained in:
parent
6eccbe27ec
commit
2d90919047
9 changed files with 86 additions and 7 deletions
|
@ -664,6 +664,10 @@ LRESULT CMainWindow::OnCommand(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bH
|
|||
imageModel.FlipVertically();
|
||||
break;
|
||||
case 3: /* rotate 90 degrees */
|
||||
if (::IsWindowVisible(selectionWindow))
|
||||
selectionModel.RotateNTimes90Degrees(1);
|
||||
else
|
||||
imageModel.RotateNTimes90Degrees(1);
|
||||
break;
|
||||
case 4: /* rotate 180 degrees */
|
||||
if (::IsWindowVisible(selectionWindow))
|
||||
|
@ -672,6 +676,10 @@ LRESULT CMainWindow::OnCommand(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bH
|
|||
imageModel.RotateNTimes90Degrees(2);
|
||||
break;
|
||||
case 5: /* rotate 270 degrees */
|
||||
if (::IsWindowVisible(selectionWindow))
|
||||
selectionModel.RotateNTimes90Degrees(3);
|
||||
else
|
||||
imageModel.RotateNTimes90Degrees(3);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue