From 336f2ca30261edc00a88bfdba03595d7cd4087f6 Mon Sep 17 00:00:00 2001 From: Patrick Walton Date: Fri, 21 Jun 2019 09:28:15 -0700 Subject: [PATCH] Rename `pathfinder_flash` to `pathfinder_swf` for consistency with other crates in the Rust Flash ecosystem --- Cargo.lock | 26 +++++++++++++------------- Cargo.toml | 2 +- examples/swf_basic/Cargo.toml | 6 +++--- examples/swf_basic/src/main.rs | 2 +- {flash => swf}/Cargo.toml | 2 +- {flash => swf}/src/lib.rs | 2 +- {flash => swf}/src/shapes.rs | 10 ++++++++++ {flash => swf}/src/timeline.rs | 10 ++++++++++ 8 files changed, 40 insertions(+), 20 deletions(-) rename {flash => swf}/Cargo.toml (93%) rename {flash => swf}/src/lib.rs (99%) rename {flash => swf}/src/shapes.rs (98%) rename {flash => swf}/src/timeline.rs (59%) diff --git a/Cargo.lock b/Cargo.lock index ebab8efd..186eb4ef 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1416,18 +1416,6 @@ dependencies = [ "usvg 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "pathfinder_flash" -version = "0.1.0" -dependencies = [ - "pathfinder_geometry 0.3.0", - "pathfinder_gl 0.1.0", - "pathfinder_gpu 0.1.0", - "pathfinder_renderer 0.1.0", - "swf-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "swf-tree 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "pathfinder_geometry" version = "0.3.0" @@ -1547,6 +1535,18 @@ dependencies = [ "usvg 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "pathfinder_swf" +version = "0.1.0" +dependencies = [ + "pathfinder_geometry 0.3.0", + "pathfinder_gl 0.1.0", + "pathfinder_gpu 0.1.0", + "pathfinder_renderer 0.1.0", + "swf-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "swf-tree 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "pathfinder_text" version = "0.1.0" @@ -2127,11 +2127,11 @@ name = "swf_basic" version = "0.1.0" dependencies = [ "gl 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "pathfinder_flash 0.1.0", "pathfinder_geometry 0.3.0", "pathfinder_gl 0.1.0", "pathfinder_gpu 0.1.0", "pathfinder_renderer 0.1.0", + "pathfinder_swf 0.1.0", "sdl2 0.32.2 (registry+https://github.com/rust-lang/crates.io-index)", "sdl2-sys 0.32.6 (registry+https://github.com/rust-lang/crates.io-index)", "swf-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/Cargo.toml b/Cargo.toml index 305b8133..d11db85e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,12 +16,12 @@ members = [ "geometry", "gl", "gpu", - "flash", "lottie", "metal", "renderer", "simd", "svg", + "swf", "text", "ui", "utils/area-lut", diff --git a/examples/swf_basic/Cargo.toml b/examples/swf_basic/Cargo.toml index eb64fe17..ced4ed19 100644 --- a/examples/swf_basic/Cargo.toml +++ b/examples/swf_basic/Cargo.toml @@ -12,9 +12,6 @@ sdl2-sys = "0.32" swf-parser = "0.7.0" swf-tree = "0.7.0" -[dependencies.pathfinder_flash] -path = "../../flash" - [dependencies.pathfinder_geometry] path = "../../geometry" @@ -26,3 +23,6 @@ path = "../../gpu" [dependencies.pathfinder_renderer] path = "../../renderer" + +[dependencies.pathfinder_swf] +path = "../../swf" diff --git a/examples/swf_basic/src/main.rs b/examples/swf_basic/src/main.rs index ed5e9f9d..39959d99 100644 --- a/examples/swf_basic/src/main.rs +++ b/examples/swf_basic/src/main.rs @@ -21,7 +21,7 @@ use sdl2::event::Event; use sdl2::keyboard::Keycode; use sdl2::video::GLProfile; use pathfinder_renderer::scene::Scene; -use pathfinder_flash::{draw_paths_into_scene, process_swf_tags}; +use pathfinder_swf::{draw_paths_into_scene, process_swf_tags}; use std::env; use std::fs::read; use pathfinder_geometry::basic::transform2d::Transform2DF; diff --git a/flash/Cargo.toml b/swf/Cargo.toml similarity index 93% rename from flash/Cargo.toml rename to swf/Cargo.toml index 2dff909f..b063d864 100644 --- a/flash/Cargo.toml +++ b/swf/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "pathfinder_flash" +name = "pathfinder_swf" version = "0.1.0" authors = ["Jon Hardie "] edition = "2018" diff --git a/flash/src/lib.rs b/swf/src/lib.rs similarity index 99% rename from flash/src/lib.rs rename to swf/src/lib.rs index 34bf5518..94bf0e35 100644 --- a/flash/src/lib.rs +++ b/swf/src/lib.rs @@ -1,4 +1,4 @@ -// pathfinder/flash/src/lib.rs +// pathfinder/swf/src/lib.rs // // Copyright © 2019 The Pathfinder Project Developers. // diff --git a/flash/src/shapes.rs b/swf/src/shapes.rs similarity index 98% rename from flash/src/shapes.rs rename to swf/src/shapes.rs index 73d55603..b2c94936 100644 --- a/flash/src/shapes.rs +++ b/swf/src/shapes.rs @@ -1,3 +1,13 @@ +// pathfinder/swf/src/shapes.rs +// +// Copyright © 2019 The Pathfinder Project Developers. +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + use pathfinder_renderer::paint::Paint; use pathfinder_geometry::stroke::{LineJoin, LineCap}; use crate::{Twips, Point2}; diff --git a/flash/src/timeline.rs b/swf/src/timeline.rs similarity index 59% rename from flash/src/timeline.rs rename to swf/src/timeline.rs index 662dba00..e3f684b3 100644 --- a/flash/src/timeline.rs +++ b/swf/src/timeline.rs @@ -1,3 +1,13 @@ +// pathfinder/swf/src/timeline.rs +// +// Copyright © 2019 The Pathfinder Project Developers. +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + struct PlacementInfo { symbol_id: u32, translate_x: Twips,