Commit d9f229e
committed
feat: Implement real-time BCP handle updates and curved path preview in pen tool
- Add real-time handle updates during modifier+drag in onPointerMove
- Update pen preview overlay to render curved paths with Bézier control points
- Track lastAnchorHandleOut to properly connect curves between anchors
- Fix shape rendering and selection issues for transformed shapes (Star/Polygon)
- Apply transforms to paths instead of canvas to prevent stroke width scaling
- Update hit testing and bounds calculation to account for shape transforms
- Add bounding box parameters for non-uniform scaling of shapes
- Implement FontForge-style pen tool behavior with immediate anchor creation
The pen tool now provides immediate visual feedback:
- Click down creates anchor and line immediately
- Normal drag moves the anchor position
- Alt/Cmd + drag keeps anchor at original position but extends Bézier handles
- Path curves update in real-time according to BCP handles during drag1 parent cc02e08 commit d9f229e
15 files changed
Lines changed: 1190 additions & 154 deletions
File tree
- lib
- application
- services
- tools
- pen
- shapes
- domain
- document
- models
- presentation
- canvas
- overlays
- painter
- layers
- shell
- macos
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
156 | 156 | | |
157 | 157 | | |
158 | 158 | | |
| 159 | + | |
159 | 160 | | |
160 | 161 | | |
161 | 162 | | |
| |||
168 | 169 | | |
169 | 170 | | |
170 | 171 | | |
| 172 | + | |
171 | 173 | | |
172 | 174 | | |
173 | 175 | | |
| |||
177 | 179 | | |
178 | 180 | | |
179 | 181 | | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
180 | 225 | | |
181 | 226 | | |
182 | 227 | | |
| 228 | + | |
183 | 229 | | |
184 | 230 | | |
185 | 231 | | |
| |||
256 | 302 | | |
257 | 303 | | |
258 | 304 | | |
259 | | - | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
260 | 312 | | |
261 | 313 | | |
262 | 314 | | |
| |||
0 commit comments