-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Crop module gets orientation proxy support
While developing an image in darkroom we might have set a cropping area, this commit implements functionality to keep the cropped area if we change orientation via the flip module. Three parts in the codebase required additions without changing existing code. 1. `dt_develop_t` got two additions in cropping proxy, `struct dt_iop_module_t *flip_handler` points to the crop module and is setup there. We can't use `exposer` as the proxy because that is dynamically set in pixelpipe code only if enabled and we want to change crop parameters even if crop is disabled. `void (*flip_callback)` is the callback function changing crop parameters, defined in crop. 2. Orientation module uses the `flip_callback(self, orientation)` requesting changes in crop. 3. In crop we have `_crop_handle_flip()` as proxy `flip_callback` with proper logs about action. - It gets the data from self `dt_iop_crop_params_t`, - does the requested action, - updates gui from parameters - adds a new history stack entry (respecting the current `crop->enabled` status).
- Loading branch information
1 parent
6fe9931
commit 12e3a19
Showing
3 changed files
with
52 additions
and
2 deletions.
There are no files selected for viewing
This file contains 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 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 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