mirror of
https://github.com/storytold/craft-libs.git
synced 2026-11-17 05:14:24 +00:00
fwb2-fix: R107 SelectionOverlay::mapped takes Option<PointMap>
This commit is contained in:
@@ -153,8 +153,7 @@ pub struct SelectionOverlay<'a> {
|
||||
/// pixels each way. 0 counts as 1.
|
||||
#[prop(quantity = "reduction")]
|
||||
reduction: u32,
|
||||
/// Draws the outline through this map, document point to document point.
|
||||
#[prop(func = "Fn(Point) -> Option<Point>")]
|
||||
/// The outline's map, document point to document point; set with [`mapped`](Self::mapped).
|
||||
mapped: Option<PointMap<'a>>,
|
||||
/// The Selection Preview mode (Color Range's modes, or Quick Mask).
|
||||
#[prop]
|
||||
@@ -184,6 +183,12 @@ impl<'a> SelectionOverlay<'a> {
|
||||
}
|
||||
}
|
||||
|
||||
/// Draws the outline through `map` (a [`PointMap`], bends kept); `None` draws it where it is.
|
||||
pub fn mapped(mut self, map: Option<PointMap<'a>>) -> Self {
|
||||
self.mapped = map;
|
||||
self
|
||||
}
|
||||
|
||||
/// Shows the overlay over `canvas`, the rect of the canvas it is shown in.
|
||||
pub fn show_at(self, ui: &mut Ui, canvas: Rect) -> SelectionOverlayOutput {
|
||||
let Self { label, source, visible, offset, reduction, mapped, preview, quick_mask, unit } = self;
|
||||
|
||||
Reference in New Issue
Block a user