Files
craft-libs/crates/imaging
20a38fb5b0 Lasso and Polygonal Lasso show the crosshair under the precise cursor (Caps Lock) (#3650)
Under the canvas's precise cursor (Other Cursors > Precise, swapped by Caps Lock) the Lasso and the Polygonal Lasso
show the crosshair, its centre the point the outline takes, with the operation's badge. Before, Caps Lock left the
arrow and the lasso icon in place. The Magnetic Lasso already showed its width circle there.

A trial toggles Caps Lock off, on and off over the Lasso and the Polygonal Lasso and checks the crosshair comes and
goes; the Magnetic Lasso's width-circle trial stays alongside it.

Split out of #3398 at review.

Co-authored-by: citrunade <301939363+citrunade@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 09:09:56 -06:00
..
2026-11-15 04:46:07 +00:00

craft-imaging

Raster image editing for Craft apps.

Without egui, on every target: craft_imaging::scopes (the clipping rule and clipping masks, the vectorscope grid, hue and saturation, and histogram statistics; the app does the colour management and the histogram count), selection (selection preview and Quick Mask rules), trace (mask outline tracing) and layer_style (the Layer Style value model).

With the ui feature, craft_imaging::ui has:

  • the WarpGrid (a warp's mesh on a canvas, with WarpMesh, WarpEdit and the press and release helpers), the WarpFields of its options bar, PinWarp with PinWarpBar, and PerspectiveWarp with PerspectiveBar; TransformPreview shows a transform or warp in progress;
  • the LevelsEditor (a channel's Levels over its histogram) and the editors of the other adjustments: curves (CurvesPanel), brightness and contrast, color balance, hue and saturation, black and white, channel mixer, selective color, photo filter and threshold, over an AdjustSession, listed by AdjustmentKind and hosted in the AdjustmentsPanel; LivePreview renders them on a proxy of the image;
  • the LayerStyleDialog with the BlendIfBar and the ContourField;
  • the selection tools (MarqueeTool, LassoTool, PolygonLassoTool, MagneticLassoTool), the SelectionOverlay (ants, matte, Quick Mask) and the MaskViewControls;
  • the full-window editors, each a workspace over a session, panel and options bar: SelectMaskWorkspace, ContentAwareFillWorkspace, FilterGalleryWorkspace, LiquifyWorkspace, WideAngleWorkspace and VanishingPointWorkspace (settings in VanishingPointSettings and StampSettings); the limits an app passes to Select and Mask and Content-Aware Fill are SelectMaskLimits and FillLimits, and a refused edit is a LimitRefused or a FillLimit; BlurPinsOverlay and BlurPinsPanel edit blur pins on the canvas;
  • the ChannelsPanel (thumbnails, eyes, selection, rename in place with start_rename, drag, the footer (ChannelsEvent::Footer and FooterDrop) and the menus over plain ChannelRows; ChannelsPanel::style(&UiTokens) gives the look);
  • the ScopePanel (histogram, statistics, tone zones and vectorscope) and the ClippingOverlay for a preview;
  • their stories, registered in craft_ui::testing::stories().

The main types of every module are re-exported at craft_imaging::ui. The panels and editors report what the user did as events and hold no document. Thumbnails load as jobs on craft_host::queue::JobQueue.

The curves editor and the histogram stay in craft-ui.