@@ -34,35 +34,36 @@ void DrawInterlacing::drawGeometries(Gen::AxisId axisIndex) const
3434 || guides.interlacings == false )
3535 return ;
3636
37- std::map<double , double > othWeights {{0.0 , 0.0 }, {1.0 , 0.0 }};
37+ std::map<double , double > otherWeights {{0.0 , 0.0 }, {1.0 , 0.0 }};
3838
39- const auto &othGuides = parent.plot ->guides .at (!axisIndex);
40- const auto &othAxisStyle =
39+ const auto &otherGuides = parent.plot ->guides .at (!axisIndex);
40+ const auto &otherAxisStyle =
4141 parent.rootStyle .plot .getAxis (!axisIndex);
42- if (!othAxisStyle .interlacing .color ->isTransparent ()
43- && othGuides .interlacings != false )
44- for (const auto &othInterval :
42+ if (!otherAxisStyle .interlacing .color ->isTransparent ()
43+ && otherGuides .interlacings != false )
44+ for (const auto &otherInterval :
4545 parent.getIntervals (!axisIndex)) {
46- if (Math::Floating::is_zero (othInterval .isSecond ))
46+ if (Math::Floating::is_zero (otherInterval .isSecond ))
4747 continue ;
48- auto min = std::max (othInterval .range .getMin (), 0.0 );
49- auto max = std::min (othInterval .range .getMax (), 1.0 );
50- auto mprev = std::prev (othWeights .upper_bound (min));
51- auto mnext = othWeights .lower_bound (max);
48+ auto min = std::max (otherInterval .range .getMin (), 0.0 );
49+ auto max = std::min (otherInterval .range .getMax (), 1.0 );
50+ auto mprev = std::prev (otherWeights .upper_bound (min));
51+ auto mnext = otherWeights .lower_bound (max);
5252
5353 if (mprev->first < min)
54- mprev =
55- othWeights.try_emplace (mprev, min, mprev->second );
54+ mprev = otherWeights.try_emplace (mprev,
55+ min,
56+ mprev->second );
5657 if (mnext->first > max)
57- mnext = othWeights .try_emplace (mnext,
58+ mnext = otherWeights .try_emplace (mnext,
5859 max,
5960 std::prev (mnext)->second );
6061
6162 while (mprev != mnext)
6263 mprev++->second +=
63- Math::FuzzyBool::And<double >(othInterval .weight ,
64- othInterval .isSecond ,
65- othGuides .interlacings );
64+ Math::FuzzyBool::And<double >(otherInterval .weight ,
65+ otherInterval .isSecond ,
66+ otherGuides .interlacings );
6667 }
6768
6869 auto orientation = !+axisIndex;
@@ -94,28 +95,28 @@ void DrawInterlacing::drawGeometries(Gen::AxisId axisIndex) const
9495 guides.interlacings );
9596 auto interlacingColor = *axisStyle.interlacing .color * weight;
9697
97- for (auto first = othWeights .begin (),
98+ for (auto first = otherWeights .begin (),
9899 next = std::next (first),
99- last = othWeights .end ();
100+ last = otherWeights .end ();
100101 next != last;
101102 ++next, ++first) {
102103 if (Math::Floating::is_zero (first->second ))
103104 drawInterlacing (axisIndex,
104105 interlacingColor,
105106 rect (first->first , next->first ));
106107 else if (axisIndex == Gen::AxisId::y) {
107- auto color =
108- interlacingColor
109- + *othAxisStyle. interlacing . color * first->second ;
110-
111- color.alpha =
112- 1
113- - ( 1
114- - axisStyle. interlacing . color -> alpha
115- * weight)
116- * ( 1
117- - othAxisStyle. interlacing .color ->alpha
118- * first->second );
108+ auto color = interlacingColor
109+ + *otherAxisStyle. interlacing . color
110+ * first->second ;
111+
112+ color.alpha = 1
113+ - ( 1
114+ - axisStyle. interlacing . color -> alpha
115+ * weight)
116+ * ( 1
117+ - otherAxisStyle. interlacing
118+ .color ->alpha
119+ * first->second );
119120
120121 if (weight + first->second > 1.0 )
121122 color = Math::Niebloid::interpolate (
0 commit comments