Skip to content

Conversation

@cameronwhite
Copy link
Member

This tidies up some minor issues before making further changes in PR #1515

  • Remove the reference to the owning document. This was only used for creating a Cairo.Context for building the selection path, but this doesn't actually need access to the document's active layer. Instead, a new utility method provides a context which can be used solely for building paths

  • Use DocumentSelection.Bounds() to get the selection bounds, rather than going through the Cairo.Path. This also makes the GetBounds() extension method unused, eliminating some references to the global PintaCore

  • Remove unused Path.Clone() extension method

- Remove the reference to the owning document. This was only used for creating a Cairo.Context for building the selection path, but this doesn't actually need access to the document's active layer. Instead, a new utility method provides a context which can be used solely for building paths

- Use `DocumentSelection.Bounds()` to get the selection bounds, rather than going through the Cairo.Path. This also makes the GetBounds() extension method unused, eliminating some references to the global PintaCore

- Remove unused Path.Clone() extension method
@cameronwhite cameronwhite force-pushed the refactor/document-selection branch from 772db8e to 1ab9451 Compare July 1, 2025 16:07
@cameronwhite cameronwhite merged commit 9258a5a into master Jul 3, 2025
11 checks passed
@cameronwhite cameronwhite deleted the refactor/document-selection branch July 3, 2025 01:30
@pedropaulosuzuki
Copy link
Contributor

Seems like, for some reason, we get a off-by-one selection after this commit:

Screencast.from.03-07-2025.15.34.27.webm

@cameronwhite
Copy link
Member Author

Thanks, I can reproduce that too - is it also happening for you with previous recent commits on the master branch?
For me it didn't seem to be this commit specifically which started it, but git bisect tracked it back to 8b5a06c

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants