mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-26 04:38:11 +08:00
Brush blend modes and erase/restore (#1261)
* Made blit node numerically stable. * Added blend mode parameter to brush strokes. * Fixed difference blend mode. * Added erase/restore blend modes. * Added blend mode and draw mode widgets. * Added comment explaining the ImageFrame.transform. * Initial blit/blend version. * Working version of erase/restore. * Improved inlining for blend functions. * Dsiable the blend mode selector in erase/draw mode. * Fixed incorrect bounds calculation. * Use factor instead of percentage for opacity * Rearrange options bar widgets * Tidy up blend modes * Code review --------- Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
committed by
Keavon Chambers
co-authored by
Keavon Chambers
parent
4e1bfddcd8
commit
5558deba5e
@@ -65,6 +65,15 @@ impl Bbox {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn from_transform(transform: DAffine2) -> Self {
|
||||
Self {
|
||||
top_left: transform.transform_point2(DVec2::new(0., 1.)),
|
||||
top_right: transform.transform_point2(DVec2::new(1., 1.)),
|
||||
bottom_left: transform.transform_point2(DVec2::new(0., 0.)),
|
||||
bottom_right: transform.transform_point2(DVec2::new(1., 0.)),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn affine_transform(self, transform: DAffine2) -> Self {
|
||||
Self {
|
||||
top_left: transform.transform_point2(self.top_left),
|
||||
|
||||
Reference in New Issue
Block a user