Andrea Frigido
d0f8005169
Update license field following SPDX 2.1 license expression standard ( #540 )
2024-02-06 16:59:01 +00:00
Patrick Walton
d01bc5d002
Make the fields of `TextMetrics` lazily calculated, and add an API that
...
eliminates double layouts.
This adds an extension to the HTML canvas API that allows you to pass the
`TextMetrics` object returned by `measure_text()` to `fill_text()` and/or
`stroke_text()` to draw the measured text without laying it out again. It
improves performance on the `canvas_nanovg` demo.
2020-07-21 19:33:15 -07:00
Patrick Walton
769dae4a9c
Update various front-end libraries
2020-06-23 13:15:59 -07:00
Patrick Walton
686773224c
Publish `pathfinder_text` to crates.io
2020-04-17 13:44:11 -07:00
Patrick Walton
171fb21fe7
Switch back to upstream `skribo`
2020-04-17 12:15:55 -07:00
Patrick Walton
0b43f629cd
Cache loaded fonts and glyph outlines.
...
Approximately a 70% CPU time improvement on the NanoVG demo.
2020-04-16 16:28:44 -07:00
Patrick Walton
5efdf2a04a
Implement the missing pieces of `TextMetrics` for canvas.
...
This required a `font-kit` upgrade, and with it a `skribo` upgrade.
2020-04-14 15:01:30 -07:00
Patrick Walton
895f73096e
Switch back to instanced drawing for tiles.
...
Improves tile build time by something around 2x in the NanoVG demo.
2020-04-08 17:16:54 -07:00
Patrick Walton
9d5dd7fd6a
Make text respect clip, blend mode, and opacity
2020-04-03 15:37:59 -07:00
Patrick Walton
f1d5906c9e
Switch to my branch of `skribo` for much better `fill_text()` performance
2020-03-30 21:30:14 -07:00
Adam Nemecek
3d39c5e9b7
trimmed whitespace
2020-02-27 08:13:14 -08:00
Patrick Walton
77b3555828
Separate opacity out from paint.
...
This allows `globalAlpha` to work on render targets.
2020-02-26 12:43:07 -08:00
Patrick Walton
36538d5748
Implement a few more blend modes and switch to premultiplied alpha for layer
...
compositing
2020-02-20 22:22:15 -08:00
Patrick Walton
6acd2d91f7
Implement `clear_rect()` in the canvas front-end by introducing the concept of
...
per-path blend modes.
These should be useful for some canvas composite operations as well.
2020-02-20 15:52:40 -08:00
Patrick Walton
a383c9a2ab
Fix build of `pathfinder_text`
2020-02-17 14:55:05 -08:00
Patrick Walton
496b55ee4e
Add front-end support for clip paths. They don't do anything yet.
2020-02-15 13:21:12 -08:00
Patrick Walton
fefa3c3cd3
Rename `PathObject` to `DrawPath` to differentiate it from a clip path
2020-02-15 12:39:15 -08:00
Emmanuel Gil Peyrot
6ce416e77c
Bump all outdated dependencies
...
I’m pleasantly surprised that none of these required any (visible) code
change, but tests pass so let’s go with that. :)
2020-02-06 09:39:50 +01:00
Kamal Ahmad
29713c5cd9
Bump lyon, font-kit and skribo versions to fix crashes
2019-11-20 22:51:03 +05:00
Patrick Walton
437eda96da
Overload `*` between transforms and points
2019-07-12 11:55:01 -07:00
Patrick Walton
2c984de1ea
Add convenience translation, rotation, and scaling methods to `Transform2D`
2019-07-12 11:34:48 -07:00
Patrick Walton
1eb28a5539
Fix incorrect definition of 2D transform multiplication
2019-07-12 11:26:09 -07:00
Patrick Walton
bcac119324
Rename `Transform2DF` to `Transform2F` and `Transform3DF` to `Transform4F`
2019-07-11 14:59:10 -07:00
Sebastian Köln
2f6c33cbcb
SceneExt::push_layout make transform apply to offsets
2019-07-03 14:49:43 +03:00
Patrick Walton
431dcf3d2e
Rename `pathfinder_geometry::basic` to simply `pathfinder_geometry`, and move
...
the remaining code in that crate to a new crate, `pathfinder_content`
The old hierarchy was confusing.
2019-06-21 10:06:19 -07:00
Patrick Walton
0012f09eeb
Fix examples
2019-06-20 21:43:57 -07:00
Patrick Walton
a1b0df0a42
Rename `Point2DF` to `Vector2F`, `Point3DF` to `Vector4F`, and `LineSegmentF`
...
to `LineSegment2F`.
Straw poll on Twitter suggested that these names were preferred.
2019-06-03 12:39:29 -07:00
Patrick Walton
e1bcc11ace
Change the `F32` and `I32` suffixes to `F` and `I` to match the C API.
...
They're shorter and less noisy.
2019-05-29 19:17:16 -07:00
Patrick Walton
51877426ea
Take paths by reference, not by value, in outline stroke-to-fill.
2019-05-29 15:15:40 -07:00
Patrick Walton
272b63a017
Implement square line caps
2019-05-16 10:43:43 -07:00
Patrick Walton
6eab3fa2d8
Implement `globalAlpha` for canvas
2019-05-14 18:26:10 -07:00
Patrick Walton
7518fa65c0
Update dependencies
2019-05-13 18:47:19 -07:00
Patrick Walton
f24d93819b
Add arc building methods and switch the Moiré demo to use them.
...
Also, stop taking points by reference in many methods, for consistency.
2019-05-13 12:42:13 -07:00
Patrick Walton
a5d373cb91
Rename "object" to "path" in preparation for image objects
2019-05-10 12:03:38 -07:00
Patrick Walton
a078766dc6
Implement basic text rendering in canvas with `skribo` and `font-kit`.
...
Skribo currently writes some debugging info to standard output. A patch is
forthcoming to fix that.
2019-05-09 15:21:18 -07:00