aboutsummaryrefslogtreecommitdiffstats
path: root/components/canvas/canvas_data.rs
Commit message (Collapse)AuthorAgeFilesLines
* Strict import formatting (grouping and granularity) (#30325)Samson2023-09-111-7/+9
| | | | | * strict imports formatting * Reformat all imports
* remove `extern crate` (#30311)Samson2023-09-081-0/+1
| | | | | | | | | | | * 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>
* Try to `use` WebRender types moreMartin Robinson2023-07-101-9/+10
| | | | | The newer versions of WebRender move types around between `webrender` and `webrender_api` and this will reduce the churn during the upgrade.
* Further changes required by ServoOriol Brufau2023-05-241-0/+2
|
* Bump euclid to 0.22Martin Robinson2023-01-261-4/+4
| | | | | | | | | | | | | - 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.
* When instantiating a CTFont, store the bytes that were used to create it.Josh Matthews2020-08-071-10/+4
|
* canvas: Bail out from font loading if no default font can be loaded.Josh Matthews2020-07-061-9/+20
|
* style: fix formatting.Emilio Cobos Álvarez2020-06-181-5/+3
|
* style: Remove the dependency on font-kit from style.Emilio Cobos Álvarez2020-06-181-6/+33
| | | | No good reason to have this IMO, and helps remove some #[cfg] blocks.
* Auto merge of #26697 - utsavoza:ugo/issue-11681/22-05-2020, r=jdmbors-servo2020-06-121-8/+226
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement CanvasRenderingContext2d.fillText The PR consists of broadly two main changes: - Implementation of Canvas2dRenderingContext.font - Basic implementation of Canvas2dRenderingContext.fillText Although I am not fully sure about the long term goals for the canvas backend in Servo, I assumed limited scope for font and text handling (should support simple text drawing with font selection) in the current implementation as I believe a more complete implementation would eventually be brought in as a part of #22957. --- - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #11681 - [x] There are tests for these changes
| * Derive Serialize and Deserialize traits for font styles for ↵Utsav Oza2020-06-121-3/+1
| | | | | | | | #[cfg_attr(feature = "servo")]
| * Fix ./mach build --release --with-layout-2020Utsav Oza2020-06-101-20/+107
| |
| * Enable textAlign, textBaseline and direction attributes for canvasUtsav Oza2020-06-101-27/+126
| |
| * Implement CanvasRenderingContext2D.font propertyUtsav Oza2020-06-101-0/+6
| |
| * Revert unnecessary changesUtsav Oza2020-06-101-34/+34
| |
| * Basic implementation of canvas.fillTextUtsav Oza2020-06-101-4/+32
| |
| * Check for valid arguments before processing canvas.fillTextUtsav Oza2020-06-101-35/+35
| |
* | canvas: Don't panic if webrender isn't reachable.Josh Matthews2020-06-101-1/+4
|/
* Proxy all WR interactions for layout/font/script/canvas threads to the ↵Josh Matthews2020-06-091-20/+15
| | | | | | | compositor thread. There is now a single RenderApi that is used, and all transactions are serialized through the compositor.
* update rust toolchainKunal Mohan2020-05-211-1/+1
|
* Convert all uses of UpdateResources api to use webrender transactions.Josh Matthews2020-05-111-2/+5
|
* Update euclidManish Goregaokar2020-04-071-17/+1
|
* Revert "Add a simple implementation of CanvasRenderingContext2d.fillText"Paul Rouget2020-03-241-22/+4
| | | | Windows crash: https://github.com/servo/servo/issues/26015
* Add a simple implementation of CanvasRenderingContext2d.fillTextkaiakz2020-03-191-4/+22
|
* Auto merge of #25863 - servo:synup, r=jdmbors-servo2020-03-051-2/+1
|\ | | | | | | Remove syn 0.15 from our crate graph
| * Remove syn 0.15 from our crate graph (fixes #24421)Anthony Ramine2020-03-051-2/+1
| | | | | | | | | | | | | | | | | | | | This required bumps of: * gleam * image * rust-webvr * webrender * webxr
* | Make fill_rect() draw patterns correctlypylbrecht2020-03-031-7/+36
|/
* Remove azure canvas backendDaniel Alley2020-02-251-44/+4
| | | | closes #25833
* Implement CanvasRenderingContext2D.getTransform()pylbrecht2020-02-121-0/+4
|
* Create new subpath with origin after drawing rectpylbrecht2020-01-191-6/+11
| | | | | Step 4 has been missing. https://html.spec.whatwg.org/multipage/canvas.html#dom-context-2d-rect
* Add first control point if there's no subpathpylbrecht2020-01-161-2/+5
|
* Ensure subpath for control point in quadratic_curve_to()pylbrecht2020-01-071-0/+3
|
* Ensure there's a subpath for the first control pointpylbrecht2020-01-061-1/+4
|
* Add a layer to store Pattern related informationpylbrecht2019-12-171-9/+1
| | | | | | | | 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()`).
* Implement "repeat-x" and "repeat-y" for imagespylbrecht2019-12-171-1/+9
|
* Handle empty paths in PathBuilder::get_current_point()pylbrecht2019-12-171-3/+5
| | | | | The case of calling get_current_point() on empty paths has not been handled and caused panics.
* Addresses issues raised in #24465; removes redundancy in set_bitmap_dimensionsBailey Blankenship2019-11-101-7/+39
| | | | Removed passing test .ini files and moved euclid extensions to euclidext.rs to factor out redundant code
* Implement create_gradient_stops()pylbrecht2019-08-291-2/+2
|
* Upgrade to rustc 1.39.0-nightly (f7af19c27 2019-08-15)Simon Sapin2019-08-231-1/+1
|
* Implement a few functions to make tests in draw-image and draw-path passBastien Orivel2019-08-211-3/+3
|
* WIP: Fix azure backendBastien Orivel2019-08-211-1/+1
|
* Imlplement get_composition_opBastien Orivel2019-08-211-1/+1
|
* Set the line cap to butt when drawing a rect with a 0 width/heightBastien Orivel2019-08-211-1/+3
| | | | | Otherwise raqote will draw the cap even though it shouldn't because the spec says so
* Implement clear_rectBastien Orivel2019-08-211-2/+2
|
* Implement need_to_draw_shadowBastien Orivel2019-08-211-1/+1
|
* Implement fill() for raqote::DrawTargetpylbrecht2019-08-211-4/+4
|
* Deal with fallout from mutable trait method change.Josh Matthews2019-08-211-16/+18
|
* WIP: Make GenericPathBuilder's methods take &mut selfpylbrecht2019-08-211-10/+16
|
* Make GenericPathBuilder take &mut selfpylbrecht2019-08-211-35/+43
|
* Implement StrokeOptionspylbrecht2019-08-211-1/+1
|