|
wxMaxima
|
Screenshots for the manual, made by wxMaxima itself (–screenshot). More...
#include <wx/arrstr.h>#include <wx/confbase.h>#include <wx/gdicmn.h>#include <wx/image.h>#include <wx/string.h>#include <optional>Go to the source code of this file.
Data Structures | |
| struct | wxm::ScreenshotTarget |
| What –screenshot-of asks to be shown and captured. More... | |
| struct | wxm::ScreenshotScene |
| Everything a scene's [Screenshot] group asks for. More... | |
Functions | |
| std::optional< ScreenshotScene > | wxm::ReadScreenshotScene (const wxConfigBase &config) |
| Reads a scene's [Screenshot] group. | |
| std::optional< ScreenshotTarget > | wxm::ParseScreenshotTarget (const wxString &text) |
| Reads the value of Screenshot/show. | |
| wxImage | wxm::ScreenRect (const wxRect &rect) |
| What the screen shows inside rect (screen coordinates) | |
| wxImage | wxm::TrimToContent (const wxImage &image, int padding) |
| The image cropped to everything that isn't its background, plus padding. | |
Screenshots for the manual, made by wxMaxima itself (–screenshot).
The manual's screenshots used to be made by hand, on whatever desktop the person making them had, and so they aged: in 2026 the main window still showed version 19.10. info/screenshots/ describes each one as a scene (a worksheet, a configuration and what to show), and wxMaxima, started with –screenshot, opens the scene, evaluates it, waits until Maxima is idle and every image has been decoded, shows what was asked for, saves a PNG of it and exits. Doing that from inside the program means nothing has to guess how long evaluating or rendering takes.
The picture is read back from the screen, so it is meant to run under Xvfb (or any X11 display): a Wayland compositor does not let a program read the screen.
| std::optional< wxm::ScreenshotTarget > wxm::ParseScreenshotTarget | ( | const wxString & | text | ) |
Reads the value of Screenshot/show.
| std::optional< wxm::ScreenshotScene > wxm::ReadScreenshotScene | ( | const wxConfigBase & | config | ) |
Reads a scene's [Screenshot] group.
| wxImage wxm::ScreenRect | ( | const wxRect & | rect | ) |
What the screen shows inside rect (screen coordinates)
| wxImage wxm::TrimToContent | ( | const wxImage & | image, |
| int | padding | ||
| ) |
The image cropped to everything that isn't its background, plus padding.
The background is the colour of the top-left pixel. Padding stays within the image. An image that is all background is returned unchanged.