Age | Commit message (Collapse) | Author |
|
|
|
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.
|
|
This allows us to use tools to change the panned position, since
right now this is only accessible internally to the editor.
|
|
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.
|
|
|
|
|
|
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.
|
|
This patch adds a "Clear Guides" option to the "View"-menu.
|
|
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.
|
|
|
|
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.
|
|
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).
|
|
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.
|
|
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.
|
|
Whether Guides are drawn or not is now controlled via the menu-entry
View->Show Guides.
|
|
The ImageEditor knows about its Guides, how to draw them and exposes
ways to manipulate them.
|
|
|
|
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.
|
|
While the external API has not changed, this will allow us to have
non-rectangular selections in the future.
|
|
The title is either "Untitled" (default), or the basename of the
image after we've opened or saved it.
|
|
In the new tabbed world, every ImageEditor always has an associated
Image, so this simplifies a bunch of things. :^)
|
|
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.
|
|
This will represent a complex, region-based selection in the future.
For now though, it's just a simple rectangle. :^)
|
|
|
|
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 *
|
|
You can now use Ctrl+= and Ctrl+- to zoom in and out.
|
|
If you lose your image while panning and zooming around, it is handy to
have a reset function to get back home. :^)
|
|
Moved the code on mousewheel_event to its own function.
|
|
|