-
-
Notifications
You must be signed in to change notification settings - Fork 402
Feature: Mirror Selection Tool #1487
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
Open
podzolelements
wants to merge
26
commits into
flxzt:main
Choose a base branch
from
podzolelements:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 18 commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
8c03cdb
added buttons to UI with preliminary icons
podzolelements d543167
horizontal mirroring is functional for BrushStrokes
podzolelements 039277e
center horizontal mirrors on selection area, not individual strokes
podzolelements 761ede0
horizontal mirroring of ShapeStrokes is fully functional
podzolelements 8555e6d
apply code formatting rules, no functional changes
podzolelements a5c3d41
horizontal mirroring functional on both bitmapped and vector images
podzolelements 1eaaff6
vertical mirroring fully implemented
podzolelements a40d12a
update icons
podzolelements bd036d3
condense mirror_stroke_* functions with orientation parameter
podzolelements 7fe6cc3
move point mirroring functions into rnote-compose
podzolelements 0f64659
move affine matrix transformations into Transform
podzolelements d95cbb4
add mirroring to Segments and Elements; internalize PenPath mirroring
podzolelements ee8fd4d
move mirroring logic out of Stroke for point-based shapes
podzolelements 9036e09
add mirroring for transform-based shapes
podzolelements 01d37ce
add direct mirroring to BrushStrokes
podzolelements fa56d6f
add mirroring as an operation to the Transformable trait
podzolelements 5061f26
condense Transformable mirror functions with orientation paremeter
podzolelements 27bb53a
add orientation based mirror_point
podzolelements bff1482
fix code style, no functional changes
podzolelements a1b167f
prevent mirror operations with TextStrokes selected
podzolelements 019285a
add keyboard shortcuts
podzolelements af9d5d0
change keyboard shortcuts and bind them to gtk accels
podzolelements 9a63a48
modify WidgetFlags to send a popup message to the user
podzolelements e7322e0
relocate gettext call
podzolelements 4159527
properly update stroke geometry
podzolelements 53da69d
move WidgetFlags text popup proccessing into rnote-ui
podzolelements File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| use crate::transform::MirrorOrientation; | ||
|
|
||
| /// horizontally mirrors point around line 'x = centerline_x' | ||
| pub fn mirror_point_x(point: &mut na::Vector2<f64>, centerline_x: f64) { | ||
| point.x -= centerline_x; | ||
| point.x *= -1.0; | ||
| point.x += centerline_x; | ||
| } | ||
|
|
||
| /// vertically mirrors point around line 'y = centerline_y' | ||
| pub fn mirror_point_y(point: &mut na::Vector2<f64>, centerline_y: f64) { | ||
| point.y -= centerline_y; | ||
| point.y *= -1.0; | ||
| point.y += centerline_y; | ||
| } | ||
|
|
||
| /// mirror point around either Horizontal: 'x = centerline' or Vertical: 'y = centerline' line | ||
| pub fn mirror_point(point: &mut na::Vector2<f64>, centerline: f64, orientation: MirrorOrientation) { | ||
| match orientation { | ||
| MirrorOrientation::Horizontal => { | ||
| mirror_point_x(point, centerline); | ||
| } | ||
| MirrorOrientation::Vertical => { | ||
| mirror_point_y(point, centerline); | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.