summaryrefslogtreecommitdiff
path: root/Userland/Applications/PixelPaint/ImageEditor.h
AgeCommit message (Collapse)Author
2021-09-13Everywhere: Use my fancy new serenityos.org email :^)Mustafa Quraish
2021-09-13PixelPaint: Add `ImageEditor::update_tool_cursor()` methodMustafa Quraish
This just allows us to ask the image editor to update the tool's current cursor. This is useful in cases where a tool may want to change it's cursor for some operation, and wants to invalidate the active cursor cached in the ImageEditor.
2021-09-12PixelPaint: Add setter/getter for ImageEditor::m_pan_originMustafa Quraish
This allows us to use tools to change the panned position, since right now this is only accessible internally to the editor.
2021-09-12PixelPaint: Use LibConfig to allow custom pixel grid thresholdMustafa Quraish
Depending on the size / scaling of the UI, someone might want to change what the threshold is to show the pixel grid. For instance if you are working on a 50x50 image, and want to see the grid while still fitting the whole image in the editor. Since there's no UI for settings in PixelPaint right now, this commit just uses LibConfig to read the following entry: ("PixelPaint", "PixelGrid", "Threshold") which is then used when drawing the grid.
2021-09-11PixelPaint: Add mouse indicators to the rulersDavid Isaksson
2021-09-11PixelPaint: Add rulersDavid Isaksson
2021-09-11PixelPaint: Add menu action to toggle pixel grid visibilityMustafa Quraish
You can now toggle on/off the visibility of the pixel grid from the View menu, if you don't want it shown for some reason.
2021-09-11PixelPaint: Add "Clear Guides" to remove all GuidesTobias Christiansen
This patch adds a "Clear Guides" option to the "View"-menu.
2021-09-09PixelPaint: Add `Fit Image To View` actionMustafa Quraish
This is a feature I missed from Photoshop: it sets the scale and position so that the image fits (it's longest dimension) into the editor view. There's a 5% border left around the image to provide context. This is just arbitrary seemed like the right amount after some trial and error.
2021-09-04PixelPaint: Save Guides when writing project to fileTobias Christiansen
2021-09-04PixelPaint: Move saving a project from Image into ImageEditorTobias Christiansen
The ImageEditor knows more about the image than Image itself. So to save a project with all the information known to the program about an image it's logical that ImageEditor performs that task rather than the Image. There isn't any additional data added yet, but now there's the possibility to do so.
2021-09-03PixelPaint: Add actions to rotate image left/rightMustafa Quraish
This also required adding a new hook to `ImageClient`, since there wasn't a way of telling the ImageEditor that the full rect of the image has changed (as when we rotate).
2021-08-14PixelPaint: Show Guides on GuideTool activationMarcus Nilsson
This adds on_tool_activation() to Tool which GuideTool can use to show guides, if they're hidden, when it's activated. Also show guides on mousedown since there's no use in drawing invisible guides.
2021-08-09PixelPaint: Let Tools have different cursorsMarcus Nilsson
This adds support for the Tools in PixelPaint to use different cursors within ImageEditor. For now most of them get the crosshair cursor since it's the most fitting, but in the future we will want to add custom cursors.
2021-08-07PixelPaint: Make Guides' visibility optionalTobias Christiansen
Whether Guides are drawn or not is now controlled via the menu-entry View->Show Guides.
2021-08-07PixelPaint: Include Guides in the ImageEditorTobias Christiansen
The ImageEditor knows about its Guides, how to draw them and exposes ways to manipulate them.
2021-08-02PixelPaint: Show image coordinates in the status barClément Sibille
2021-07-07PixelPaint: Allow partial invalidation of Layer and ImageAndreas Kling
Let's give ourselves the tools needed to update less than the entire image every time we paint. This patch adds plumbing so that Layer invalidations have a modified rect that gets passed on to Image, and then on to ImageEditor.
2021-06-22PixelPaint: Use Mask internally in SelectionDavipb
While the external API has not changed, this will allow us to have non-rectangular selections in the future.
2021-06-16PixelPaint: Make images keep track of their path & titleAndreas Kling
The title is either "Untitled" (default), or the basename of the image after we've opened or saved it.
2021-06-16PixelPaint: Make ImageEditor::image() return a reference (Image&)Andreas Kling
In the new tabbed world, every ImageEditor always has an associated Image, so this simplifies a bunch of things. :^)
2021-06-16PixelPaint: Make the main UI tabbed and allow multiple open images :^)Andreas Kling
This patch adds a GUI::TabWidget to the main UI and allows having multiple images open at the same time. Some of the changes here are a bit hackish and mechanical and there's still code around that needs more work to fit better in the new world. One nice side-effect of this change is that ImageEditor now always has one Image associated with it, and it never changes.
2021-06-14PixelPaint: Add a Selection class (ImageEditor has a Selection)Andreas Kling
This will represent a complex, region-based selection in the future. For now though, it's just a simple rectangle. :^)
2021-06-11PixelPaint: Convert to east-const styleAndreas Kling
2021-04-22Everything: Move to SPDX license identifiers in all files.Brian Gianforcaro
SPDX License Identifiers are a more compact / standardized way of representing file license information. See: https://spdx.dev/resources/use/#identifiers This was done with the `ambr` search and replace tool. ambr --no-parent-ignore --key-from-file --rep-from-file key.txt rep.txt *
2021-04-16PixelPaint: Add keyboard zoom shortcutsJagger De Leo
You can now use Ctrl+= and Ctrl+- to zoom in and out.
2021-04-16PixelPaint: Add Zoom Reset button to new View Menubar.Jagger De Leo
If you lose your image while panning and zooming around, it is handy to have a reset function to get back home. :^)
2021-03-23PixelPaint: ImageEditor scaling methodlucastarche
Moved the code on mousewheel_event to its own function.
2021-01-12Applications: Move to Userland/Applications/Andreas Kling