mirror of
https://github.com/servo/servo.git
synced 2025-07-22 06:43:40 +01:00
Define OffsetPath & SVGPathData on the servo-side, and StyleMotion & StyleSVGPath on the gecko-side. We parse the SVG Path string into a vector of PathCommand. To build the gfx::Path, we will convert it into gfx::Path later in a different patch. The basic flow is: - Parse SVG Path String into SVGPathData (in Rust). - Use cbindgen to make sure the layout of PathCommand and StylePathCommand, and then set the Box[PathCommand] into nsTArray<StylePathCommand>. - Try to convert nsTArray<StylePathCommand> into gfx::Path. (This part will be implemented in a different patch.) Finally, we use the gfx::Path to create a motion path transform. The layout implementation is in the later patch. Depends on D2962 Differential Revision: https://phabricator.services.mozilla.com/D2963
10 lines
468 B
Rust
10 lines
468 B
Rust
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
//! Computed types for CSS values that are related to motion path.
|
|
|
|
/// A computed offset-path. The computed value is as specified value.
|
|
///
|
|
/// https://drafts.fxtf.org/motion-1/#offset-path-property
|
|
pub use values::specified::motion::OffsetPath as OffsetPath;
|