[librsvg: 1/4] Rename light node types
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg: 1/4] Rename light node types
- Date: Mon, 14 Oct 2019 23:32:01 +0000 (UTC)
commit ccc4ea3879caca62c0f9b9a82b5906cf243071d1
Author: Paolo Borelli <pborelli gnome org>
Date: Sat Oct 12 10:35:37 2019 +0200
Rename light node types
They have the "Fe" prefix, so follow the convention.
rsvg_internals/src/create_node.rs | 6 +++---
rsvg_internals/src/filters/light/lighting.rs | 2 +-
rsvg_internals/src/node.rs | 6 +++---
3 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/rsvg_internals/src/create_node.rs b/rsvg_internals/src/create_node.rs
index da7e520a..2b722d0f 100644
--- a/rsvg_internals/src/create_node.rs
+++ b/rsvg_internals/src/create_node.rs
@@ -66,7 +66,7 @@ mod creators {
n!(create_convolve_matrix, FeConvolveMatrix, ConvolveMatrix::default);
n!(create_defs, Defs, NodeNonRendering::default);
n!(create_diffuse_lighting, FeDiffuseLighting, Lighting::new_diffuse);
- n!(create_distant_light, DistantLight, LightSource::new_distant_light);
+ n!(create_distant_light, FeDistantLight, LightSource::new_distant_light);
n!(create_displacement_map, FeDisplacementMap, DisplacementMap::default);
n!(create_ellipse, Ellipse, NodeEllipse::default);
n!(create_filter, Filter, NodeFilter::default);
@@ -87,13 +87,13 @@ mod creators {
n!(create_offset, FeOffset, Offset::default);
n!(create_path, Path, NodePath::default);
n!(create_pattern, Pattern, NodePattern::default);
- n!(create_point_light, PointLight, LightSource::new_point_light);
+ n!(create_point_light, FePointLight, LightSource::new_point_light);
n!(create_polygon, Polygon, NodePoly::new_closed);
n!(create_polyline, Polyline, NodePoly::new_open);
n!(create_radial_gradient, RadialGradient, NodeRadialGradient::default);
n!(create_rect, Rect, NodeRect::default);
n!(create_specular_lighting, FeSpecularLighting, Lighting::new_specular);
- n!(create_spot_light, SpotLight, LightSource::new_spot_light);
+ n!(create_spot_light, FeSpotLight, LightSource::new_spot_light);
n!(create_stop, Stop, NodeStop::default);
n!(create_style, Style, NodeStyle::default);
n!(create_svg, Svg, NodeSvg::default);
diff --git a/rsvg_internals/src/filters/light/lighting.rs b/rsvg_internals/src/filters/light/lighting.rs
index 2b27405e..3d3d01bc 100644
--- a/rsvg_internals/src/filters/light/lighting.rs
+++ b/rsvg_internals/src/filters/light/lighting.rs
@@ -213,7 +213,7 @@ impl Filter for Lighting {
.children()
.rev()
.filter(|c| match c.borrow().get_type() {
- NodeType::DistantLight | NodeType::PointLight | NodeType::SpotLight => true,
+ NodeType::FeDistantLight | NodeType::FePointLight | NodeType::FeSpotLight => true,
_ => false,
});
diff --git a/rsvg_internals/src/node.rs b/rsvg_internals/src/node.rs
index fa3f7b26..a7e76702 100644
--- a/rsvg_internals/src/node.rs
+++ b/rsvg_internals/src/node.rs
@@ -403,7 +403,6 @@ pub enum NodeType {
ComponentTransferFunctionG,
ComponentTransferFunctionR,
Defs,
- DistantLight,
Ellipse,
Filter,
Group,
@@ -416,12 +415,10 @@ pub enum NodeType {
NonRendering,
Path,
Pattern,
- PointLight,
Polygon,
Polyline,
RadialGradient,
Rect,
- SpotLight,
Stop,
Style,
Svg,
@@ -440,6 +437,7 @@ pub enum NodeType {
FeConvolveMatrix,
FeDiffuseLighting,
FeDisplacementMap,
+ FeDistantLight,
FeFlood,
FeGaussianBlur,
FeImage,
@@ -447,7 +445,9 @@ pub enum NodeType {
FeMergeNode,
FeMorphology,
FeOffset,
+ FePointLight,
FeSpecularLighting,
+ FeSpotLight,
FeTile,
FeTurbulence,
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]