Conversation
…caller can access data classes from engine.
…nges in quickedit-ui module
…ss tools list in the config
…odule to "quickedit-ui" module
…& slide-out animations when showing tool-screens (for both top and bottom toolbars).
… save resources and UI glitches
…log.kt into "tool-crop" module
…lso had to move all the related files to fix resolution errors
…zing dummy items fetching.
1. Host app (or legacy façade) shows QuickEditEditor(...) with a QuickEditConfig(tools = listOf(...)). 2. Each tool registers via ToolContribution; tools that adopt the new contract implement ToolContributionWithFactory and provide a ToolFactory. 3. When user selects a tool, shell enters FullScreenTool mode, composes the tool UI, and pauses editor render (no overdraw). 4. Tool emits EditOp via ToolController.emit(op); engine applies and returns a new EditSnapshot; shell exposes it back through ToolHost.snapshot.
…ore-engine" module)
…actory and wire it into app
…ne.kt instead of accepting a pre-cropped Bitmap.
… model) & applied it in DefaultEditEngine.kt
…neShape, OvalShape, RectangleShape)
|
@codex review this PR |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| is EditOp.CropImage -> { | ||
| val baseBitmap = decode(current.image) ?: return@withContext current | ||
| val croppedBitmap = cropBitmapImageSpace(baseBitmap, op.rect) | ||
| current.copy( | ||
| image = EditImage.FromBitmap(croppedBitmap), | ||
| rev = current.rev + 1 | ||
| ) | ||
| } | ||
|
|
||
| is EditOp.DrawShape -> { | ||
| current.copy( | ||
| rev = current.rev + 1, | ||
| operations = current.operations + op | ||
| ) |
There was a problem hiding this comment.
Preserve draw operations when cropping without adjusting coordinates
When a crop is applied the engine replaces the backing bitmap but leaves snapshot.operations untouched. Drawn shapes in the list still store coordinates relative to the original image, so after CropImage the subsequent render() call draws those strokes on the cropped bitmap using stale coordinates. Users who draw and then crop will see their strokes shift or render outside the visible area. Either clear the operations list or transform the shape coordinates to the new crop rectangle before pushing the new snapshot.
Useful? React with 👍 / 👎.
No description provided.