[librsvg] Move the filter node out of filters
- From: Paolo Borelli <pborelli src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg] Move the filter node out of filters
- Date: Sat, 2 Nov 2019 11:45:58 +0000 (UTC)
commit 7559e86c819f2ce9731edade899381a014d9a3c0
Author: Paolo Borelli <pborelli gnome org>
Date: Sat Nov 2 12:15:12 2019 +0100
Move the filter node out of filters
<filter> is a "normal" node, let's use the submodule only for "fe"
elements.
Makefile.am | 2 +-
rsvg_internals/src/create_node.rs | 2 +-
rsvg_internals/src/{filters/node.rs => filter.rs} | 2 --
rsvg_internals/src/filters/context.rs | 2 +-
rsvg_internals/src/filters/mod.rs | 4 +---
rsvg_internals/src/lib.rs | 1 +
6 files changed, 5 insertions(+), 8 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 5d8293d2..fb05d5f0 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -37,6 +37,7 @@ LIBRSVG_INTERNALS_SRC = \
rsvg_internals/src/document.rs \
rsvg_internals/src/dpi.rs \
rsvg_internals/src/drawing_ctx.rs \
+ rsvg_internals/src/filter.rs \
rsvg_internals/src/filters/bounds.rs \
rsvg_internals/src/filters/blend.rs \
rsvg_internals/src/filters/color_matrix.rs \
@@ -55,7 +56,6 @@ LIBRSVG_INTERNALS_SRC = \
rsvg_internals/src/filters/merge.rs \
rsvg_internals/src/filters/morphology.rs \
rsvg_internals/src/filters/mod.rs \
- rsvg_internals/src/filters/node.rs \
rsvg_internals/src/filters/input.rs \
rsvg_internals/src/filters/offset.rs \
rsvg_internals/src/filters/tile.rs \
diff --git a/rsvg_internals/src/create_node.rs b/rsvg_internals/src/create_node.rs
index 8feda81e..fee05e2a 100644
--- a/rsvg_internals/src/create_node.rs
+++ b/rsvg_internals/src/create_node.rs
@@ -19,12 +19,12 @@ use crate::filters::{
},
merge::{FeMerge, FeMergeNode},
morphology::FeMorphology,
- node::Filter,
offset::FeOffset,
tile::FeTile,
turbulence::FeTurbulence,
};
+use crate::filter::Filter;
use crate::gradient::{LinearGradient, RadialGradient, Stop};
use crate::image::Image;
use crate::link::Link;
diff --git a/rsvg_internals/src/filters/node.rs b/rsvg_internals/src/filter.rs
similarity index 99%
rename from rsvg_internals/src/filters/node.rs
rename to rsvg_internals/src/filter.rs
index 590a363c..d0914c1b 100644
--- a/rsvg_internals/src/filters/node.rs
+++ b/rsvg_internals/src/filter.rs
@@ -1,4 +1,3 @@
-//! The <filter> node.
use cairo;
use markup5ever::{expanded_name, local_name, namespace_url, ns};
@@ -24,7 +23,6 @@ pub struct Filter {
impl Default for Filter {
/// Constructs a new `Filter` with default properties.
- #[inline]
fn default() -> Self {
Self {
x: LengthHorizontal::parse_str("-10%").unwrap(),
diff --git a/rsvg_internals/src/filters/context.rs b/rsvg_internals/src/filters/context.rs
index c5858e7b..85055722 100644
--- a/rsvg_internals/src/filters/context.rs
+++ b/rsvg_internals/src/filters/context.rs
@@ -7,6 +7,7 @@ use cairo;
use crate::bbox::BoundingBox;
use crate::coord_units::CoordUnits;
use crate::drawing_ctx::{DrawingCtx, ViewParams};
+use crate::filter::Filter;
use crate::node::RsvgNode;
use crate::paint_server::PaintServer;
use crate::properties::ComputedValues;
@@ -16,7 +17,6 @@ use crate::unit_interval::UnitInterval;
use super::error::FilterError;
use super::input::Input;
-use super::node::Filter;
/// A filter primitive output.
#[derive(Debug, Clone)]
diff --git a/rsvg_internals/src/filters/mod.rs b/rsvg_internals/src/filters/mod.rs
index 47e0cb45..8dc3bfb6 100644
--- a/rsvg_internals/src/filters/mod.rs
+++ b/rsvg_internals/src/filters/mod.rs
@@ -8,6 +8,7 @@ use crate::bbox::BoundingBox;
use crate::coord_units::CoordUnits;
use crate::drawing_ctx::DrawingCtx;
use crate::error::{RenderingError, ValueErrorKind};
+use crate::filter::Filter;
use crate::length::{LengthHorizontal, LengthUnit, LengthVertical};
use crate::node::{CascadedValues, NodeResult, NodeTrait, NodeType, RsvgNode};
use crate::parsers::{ParseError, ParseValue};
@@ -28,9 +29,6 @@ use self::error::FilterError;
mod input;
use self::input::Input;
-pub mod node;
-use self::node::Filter;
-
/// A filter primitive interface.
pub trait FilterEffect: NodeTrait {
/// Renders this filter primitive.
diff --git a/rsvg_internals/src/lib.rs b/rsvg_internals/src/lib.rs
index 5dec7d59..c4975476 100644
--- a/rsvg_internals/src/lib.rs
+++ b/rsvg_internals/src/lib.rs
@@ -94,6 +94,7 @@ mod document;
mod dpi;
mod drawing_ctx;
mod error;
+mod filter;
pub mod filters;
mod font_props;
mod gradient;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]