diff --git a/examples/swf_basic/Cargo.toml b/examples/swf_basic/Cargo.toml index ced4ed19..82788e0d 100644 --- a/examples/swf_basic/Cargo.toml +++ b/examples/swf_basic/Cargo.toml @@ -9,8 +9,8 @@ gl = "0.6" sdl2 = "0.32" sdl2-sys = "0.32" -swf-parser = "0.7.0" -swf-tree = "0.7.0" +swf-parser = "0.10" +swf-types = "0.10" [dependencies.pathfinder_geometry] path = "../../geometry" diff --git a/examples/swf_basic/src/main.rs b/examples/swf_basic/src/main.rs index dc2388a5..4a7c0f9c 100644 --- a/examples/swf_basic/src/main.rs +++ b/examples/swf_basic/src/main.rs @@ -63,7 +63,7 @@ fn main() { swf_bytes = Vec::from(&default_tiger[..]); } - let (_, movie): (_, swf_tree::Movie) = swf_parser::parsers::movie::parse_movie(&swf_bytes[..]).unwrap(); + let (_, movie): (_, swf_types::Movie) = swf_parser::streaming::movie::parse_movie(&swf_bytes[..]).unwrap(); // Set up SDL2. let sdl_context = sdl2::init().unwrap(); diff --git a/swf/Cargo.toml b/swf/Cargo.toml index b86be9a5..b079a8e3 100644 --- a/swf/Cargo.toml +++ b/swf/Cargo.toml @@ -5,8 +5,8 @@ authors = ["Jon Hardie "] edition = "2018" [dependencies] -swf-parser = "0.7.0" -swf-tree = "0.7.0" +swf-parser = "0.10" +swf-types = "0.10" [dependencies.pathfinder_color] path = "../color" diff --git a/swf/src/lib.rs b/swf/src/lib.rs index 6035da6f..f169f832 100644 --- a/swf/src/lib.rs +++ b/swf/src/lib.rs @@ -15,9 +15,8 @@ use pathfinder_content::stroke::{OutlineStrokeToFill, StrokeStyle}; use pathfinder_geometry::vector::Vector2F; use pathfinder_renderer::scene::{PathObject, Scene}; -use swf_tree; -use swf_tree::tags::SetBackgroundColor; -use swf_tree::{Tag, SRgb8, Movie}; +use swf_types::tags::SetBackgroundColor; +use swf_types::{Tag, SRgb8, Movie}; use crate::shapes::{GraphicLayers, PaintOrLine}; @@ -138,7 +137,7 @@ pub fn process_swf_tags(movie: &Movie) -> (SymbolLibrary, Stage) { stage.background_color = *color; }, Tag::DefineShape(shape) => { - symbol_library.add_symbol(Symbol::Graphic(shapes::decode_shape(&shape))); + symbol_library.add_symbol(Symbol::Graphic(shapes::decode_shape(shape))); // We will assume that symbol ids just go up, and are 1 based. let symbol_id: SymbolId = shape.id; debug_assert!(symbol_id as usize == symbol_library.0.len()); diff --git a/swf/src/shapes.rs b/swf/src/shapes.rs index 2b3d3c46..aefafe37 100644 --- a/swf/src/shapes.rs +++ b/swf/src/shapes.rs @@ -15,9 +15,9 @@ use pathfinder_content::stroke::{LineJoin, LineCap}; use pathfinder_renderer::paint::Paint; use std::cmp::Ordering; use std::mem; -use swf_tree::tags::DefineShape; -use swf_tree::{CapStyle, FillStyle, JoinStyle, LineStyle, ShapeRecord, StraightSRgba8, Vector2D}; -use swf_tree::{fill_styles, join_styles, shape_records}; +use swf_types::tags::DefineShape; +use swf_types::{CapStyle, FillStyle, JoinStyle, LineStyle, ShapeRecord, StraightSRgba8, Vector2D}; +use swf_types::{fill_styles, join_styles, shape_records}; #[derive(Clone, Copy, Debug)] pub(crate) struct LineSegment {