Skip to content

Conversation

@longkidkoolstar
Copy link

  • Implement warp mode and text mask strokes in TextBlock class
  • Add warp editing controls in TextBlkShapeControl
  • Introduce text mask brush functionality in Canvas
  • Add undo/redo support for warp and text mask operations
  • Implement quad and mesh warping algorithms in TextBlkItem

Also made pressing escape for Text Erase to escape out of it

- Implement warp mode and text mask strokes in TextBlock class
- Add warp editing controls in TextBlkShapeControl
- Introduce text mask brush functionality in Canvas
- Add undo/redo support for warp and text mask operations
- Implement quad and mesh warping algorithms in TextBlkItem
- Add config option to move warp/transform/eraser tools to advanced text sidebar
- Implement signal connections between canvas and text panel components
- Update context menu to conditionally show text tools based on config
- Add new methods for text tool operations in canvas and text panel
…menu

Remove angle and squeeze buttons from text format panel and move them to the context menu for cleaner UI. This change simplifies the text formatting panel while maintaining all functionality through the context menu.
…ntrol

- Add mesh-based warping mode for more flexible text deformation
- Implement center control point for rise/fall warping effects
- Support edge handles for both quad and mesh warping modes
- Improve warping visualization with stroke outlines
Add raster scaling to text rendering to improve quality on high DPI displays. The changes include:
- Calculating appropriate scale based on device DPI and dimensions
- Applying scaling to the rendered image
- Adding antialiasing and smooth transform hints
- Ensuring proper image bounds when drawing
Add configurable option to enable high quality rendering for text warp preview. When enabled, uses higher raster scale for better quality. Also adds cache invalidation method to update text items when quality setting changes.
@dmMaze
Copy link
Owner

dmMaze commented Dec 21, 2025

Well done and thank you for your hard work!

The warping seems to result in the following slashed artifacts:
image
The font is Microsoft YaHei UI, many other fonts (such as Arial) also share the issue.

Besides, the corner ctrl blocks' movement seems to be attached to edge blocks:
output

Implement adaptive mesh sizing for warp editing based on bounding rect dimensions and target cell size. Add mesh edge point calculation and improved z-value handling for control blocks. Introduce OpenCV-based mesh warping with caching for better performance.

Refactor text alignment handling for vertical text and improve mesh warping quality with better interpolation and edge handling.
@longkidkoolstar
Copy link
Author

Well done and thank you for your hard work!

The warping seems to result in the following slashed artifacts: image The font is Microsoft YaHei UI, many other fonts (such as Arial) also share the issue.

Besides, the corner ctrl blocks' movement seems to be attached to edge blocks: output output

Thanks for the feedback!

Artifacts: Fixed. I rewrote the warp backend to use continuous remapping, which completely eliminates the diagonal seams/slashes.

Handles: Fixed. I updated the control logic to decouple the corners from the edges. Moving an edge now leaves the corner handle in place, but I left moving the corner affect the edge for a more unified wraping. If you think itll be better I can remove that one too.

warping
erasing

@dmMaze
Copy link
Owner

dmMaze commented Dec 23, 2025

Here's another bug involving CJK characters:
output

I typed "测试" and warping it resulted in an abrupt shift for the central handles

@dmMaze
Copy link
Owner

dmMaze commented Dec 23, 2025

And the handle won't disappear while creating a rect region (which it should) for the rectangle tool in painting mode.

Add _controls_hidden flag to track control visibility state and consolidate hide/show logic in hideControls/showControls methods. Remove duplicate visibility control code from startEditing/endEditing methods.
@longkidkoolstar
Copy link
Author

longkidkoolstar commented Dec 25, 2025

And the handle won't disappear while creating a rect region (which it should) for the rectangle tool in painting mode.

I fixed the issues with the rect region for the rectangle tool in painting mode, but for the other
issue with the abrupt shift in the central handles I was unable to recreate it middle

Could you perhaps mention the font you were using?

@dmMaze
Copy link
Owner

dmMaze commented Dec 26, 2025

@longkidkoolstar
All fonts I'm using exhibit the issue. You could try SimSun or Noto Sans CJK SC, also try to make the font size larger, and drag & drop the central handle several times

@dmMaze
Copy link
Owner

dmMaze commented Dec 26, 2025

Besides, please make an option to disable the warping effect, remind me if it already exists.
And is there a good reason that the central handle can't move horizontally?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants