Oriol Brufau
f5bdfdfe94
Upgrade Stylo to 2024-03-01 ( #32089 )
...
* Upgrade Stylo to 2024-03-01
* Fixup for https://bugzil.la/1882754
* Update test expectations
2024-04-16 12:27:51 +00:00
Oriol Brufau
fff9ef87e6
Update Stylo to 2023-10-16 ( #31932 )
...
* Update Stylo to 2023-10-16
* Fixup for https://phabricator.services.mozilla.com/D185154
* Fixup for https://phabricator.services.mozilla.com/D188216
* Fixup for https://phabricator.services.mozilla.com/D185677
* Fixup for https://phabricator.services.mozilla.com/D188566
* Fixup for https://phabricator.services.mozilla.com/D188727
* Fixup for https://phabricator.services.mozilla.com/D189475
* Fixup for https://phabricator.services.mozilla.com/D189521
* Fixup for https://phabricator.services.mozilla.com/D188812
* Fixup for https://phabricator.services.mozilla.com/D189484
* Update test expectations
2024-03-30 13:30:13 +00:00
Oriol Brufau
c07484fcb6
Update Stylo to 2023-09-01 ( #31609 )
...
* Update Stylo to 2023-09-01
* Fixup for https://phabricator.services.mozilla.com/D184929
* Fixup for https://phabricator.services.mozilla.com/D184526
* Fixup for https://phabricator.services.mozilla.com/D184525
* Fixup for https://phabricator.services.mozilla.com/D185154
* Fixup for https://phabricator.services.mozilla.com/D184685
* Fixup for https://phabricator.services.mozilla.com/D185916
* Fixup for https://phabricator.services.mozilla.com/D185492
* Fixup for https://phabricator.services.mozilla.com/D186626
* Update test expectations
2024-03-18 13:52:40 +00:00
eri
03d64d0675
clippy: Fix assorted warnings in components/
( #31628 )
...
* clippy: fix assorted warnings in `components/`
* fix: new and default
* fix: review comments
2024-03-13 08:31:58 +00:00
eri
5c4f8cf0df
clippy: fix some warnings in components/canvas ( #31563 )
2024-03-08 07:24:01 +00:00
Oriol Brufau
11414d0c94
Further changes required by Servo
2023-11-21 15:36:35 +01:00
Oriol Brufau
bb55e923bb
Further changes required by Servo
2023-11-06 09:35:57 +01:00
Ennui Langeweile
a6ceca6d9f
Clean up a bit of the canvas backend abstractions ( #30637 )
...
* Clean up a bit of the canvas backend abstractions
* Remove unused import
Sneaky, sneaky little hecker
2023-10-27 23:06:43 +00:00
Samson
aad2dccc9c
Strict import formatting (grouping and granularity) ( #30325 )
...
* strict imports formatting
* Reformat all imports
2023-09-11 19:16:54 +00:00
Samson
711dbbd4af
remove extern crate
( #30311 )
...
* remove extern crate
* Update components/script_plugins/lib.rs
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
---------
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
2023-09-08 12:11:31 +00:00
Martin Robinson
423cc34cb0
Bump euclid to 0.22
...
- Also updates raqote to latest with an upgrade of font-kit to 0.11
applied on as a patch
- Update lyon_geom to the latest version
Major change:
- All matrices are now stored in row major order. This means that
parameters to rotation functions no longer should be negated.
- `post_...()` functions are now named `then()`. `pre_transform()` is removed,
so `then()` is used and the order of operations changed.
2023-01-26 08:59:21 +01:00
Josh Matthews
8ecc1a80a7
Skip missing glyphs when drawing 2d canvas text.
2020-08-07 13:57:57 -04:00
Utsav Oza
d1241a8d06
Fix ./mach build --release --with-layout-2020
2020-06-10 22:34:24 +05:30
Utsav Oza
34d0c313dc
Enable textAlign, textBaseline and direction attributes for canvas
2020-06-10 22:34:20 +05:30
Utsav Oza
c21fde3751
Implement CanvasRenderingContext2D.font property
2020-06-10 22:11:24 +05:30
Utsav Oza
7883718c12
Query layout to resolve canvas font property value
2020-06-10 22:10:42 +05:30
Utsav Oza
f161ab8e57
Basic implementation of canvas.fillText
2020-06-10 22:10:42 +05:30
Paul Rouget
40f6cd87d4
Revert "Add a simple implementation of CanvasRenderingContext2d.fillText"
...
Windows crash: https://github.com/servo/servo/issues/26015
2020-03-24 10:35:52 +01:00
kaiakz
0d0ac986b7
Add a simple implementation of CanvasRenderingContext2d.fillText
2020-03-19 15:40:14 +08:00
pylbrecht
967fabb0d0
Make fill_rect() draw patterns correctly
2020-03-03 07:01:27 +01:00
pylbrecht
86ad6ed3b8
Refactor arc() and ellipse() to use lyon_geom::Arc
2020-02-26 06:45:47 +01:00
pylbrecht
ae110f2e6c
Add missing CompositionStyle::Clear
2020-01-27 19:21:45 +01:00
pylbrecht
e0547855df
Remove duplication for creating gradient stops
2019-12-17 19:52:03 +01:00
pylbrecht
7c8c230d93
Add transform to Pattern::Surface to properly draw images
2019-12-17 19:52:03 +01:00
pylbrecht
9a2370a3a8
Consider empty gradients in is_zero_size_gradient()
2019-12-17 19:52:02 +01:00
pylbrecht
ada7986fef
Handle BlendMode::Clear
in GenericDrawTarget::fill()
2019-12-17 19:52:02 +01:00
pylbrecht
a50aef6f00
Add a layer to store Pattern related information
...
Some information of `canvas_data::Pattern` was lost by
converting it to `raqote::Source` due to the fact that Raqote
did not store this information (e.g. linear gradient's start/end
points). We introduce another layer to keep this information for later
use (like in `is_zero_size_gradient()`).
2019-12-17 19:52:02 +01:00
pylbrecht
1aecf40922
Implement "repeat-x" and "repeat-y" for images
2019-12-17 19:52:02 +01:00
pylbrecht
25d036f05c
Set images' ExtendMode based on available information
2019-12-17 19:52:02 +01:00
pylbrecht
1cdcbb25fa
Handle overlapping gradient stops for linear gradients
...
From `addColorStop(offset, color)`s spec:
If multiple stops are added at the same offset on a gradient, they must
be placed in the order added, with the first one closest to the start of
the gradient, and each subsequent one infinitesimally further along
towards the end point (in effect causing all but the first and last stop
added at each point to be ignored)
https://www.w3.org/html/test/results/2dcontext/annotated-spec/canvas.html#testrefs.2d.gradient.interpolate.overlapu
2019-12-17 19:52:01 +01:00
pylbrecht
04e9523e5f
Use push_layer_with_blend() only when necessary
...
push_layer_with_blend() comes at a performance cost, so we only use it
on blend modes that require it.
2019-12-17 19:52:01 +01:00
pylbrecht
a02daef7b2
Make arc() wrap angles mod 2pi
2019-12-17 19:52:01 +01:00
pylbrecht
02e3325416
Make arc() use anticlockwise
argument
2019-12-17 19:52:01 +01:00
pylbrecht
da9b4c33cd
Make fill() handle all composition operations
2019-12-17 19:52:00 +01:00
pylbrecht
47ee2729ec
Make fill() draw uncovered pixels as (0,0,0,0) for certain composition ops
2019-12-17 19:52:00 +01:00
pylbrecht
4d4e68ca6b
Respect direction when drawing arcs
2019-12-17 19:52:00 +01:00
pylbrecht
a473f50245
Respect FilterMode when drawing images
2019-12-17 19:51:59 +01:00
pylbrecht
16f06f24c5
Add check for handling equal radial gradients
2019-12-17 19:51:59 +01:00
pylbrecht
d87e5d831b
Add check to handle zerosize linear gradients
2019-12-17 19:51:59 +01:00
pylbrecht
55256df0ba
Use tolerance > 0 in Path::contains_point()
2019-12-17 19:51:58 +01:00
pylbrecht
5c6a12a116
Create raqote::SolidSource with premultiplied color
...
SolidSource expects a premultiplied color.
2019-12-17 19:51:57 +01:00
pylbrecht
77a8bc4a1d
Fix conversion of image data slice
2019-12-17 19:51:57 +01:00
pylbrecht
b8b33788b6
Handle empty paths in PathBuilder::get_current_point()
...
The case of calling get_current_point() on empty paths has not been
handled and caused panics.
2019-12-17 19:51:57 +01:00
pylbrecht
d6f46b5513
Apply transformation in Path::contains_point()
2019-12-17 19:51:56 +01:00
pylbrecht
c8025c9147
Don't reuse PathBuilder after calling finish()
2019-12-17 19:51:56 +01:00
pylbrecht
fa2de68919
Implement DrawTarget::snapshot()
2019-10-11 20:07:36 +02:00
pylbrecht
772f2bc2ee
Implement Path::transformed_copy_to_builder()
2019-10-11 20:07:35 +02:00
pylbrecht
f88c6efd63
Show warn! for shadow drawing operations
2019-10-11 20:06:48 +02:00
pylbrecht
308908ed40
Implement LinearGradient and RadialGradient
2019-09-17 16:58:13 +02:00
pylbrecht
b8f92937b3
Implement ColorBurn
2019-09-17 11:54:39 +02:00