-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gfx save #13430
base: master
Are you sure you want to change the base?
Gfx save #13430
Conversation
…eir respective .h and .cpp files.
Moved gfx_viewer out of anonymous namespace.
Renamed gfxWriter class to gfx_writer. Made gfx_writer class friend of gfx_viewer class. Changed bitmap_rgb32 to bitmap_argb32 for transparency support. Sorted out #include.
…o a PNG file. The file is saved under the gfxsave directory, it will be created if needed.
Hello, Please, let me know. |
It looks like workflows are still awaiting approval. |
src/frontend/mame/ui/gfx_writer.cpp
Outdated
|
||
bitmap_argb32 gfx_writer::getBitmap(int xCells, int yCells, gfx_viewer::gfxset::setinfo& set, gfx_element& gfx) const | ||
{ | ||
auto cellXpix{ (set.m_rotate & ORIENTATION_SWAP_XY) ? gfx.height() : gfx.width() }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You seem to like that method of initialization for scalar variables. I know it's correct, but it's extremely unusual. We try to avoid unusual when possible, so it would be nice to switch back to the standard '='.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Noted.
I updated te source code accordingly.
Updated variables initialisation to coding standards.
Implemented the possibility to save the currently displayed gfx set using the snapshot hotkey (default F12).
The file (PNG) will be saved under the gfxsave directory wich will be created if needed).