@@ -42,7 +42,7 @@ void drawItem::drawLines(const Styles::Guide &style,
4242 canvas.setLineColor (lineColor);
4343 auto axisPoint = blended.center .xComp () + origo.yComp ();
4444 Geom::Line line (axisPoint, blended.center );
45- if (events .plot .marker .guide ->invoke (
45+ if (rootEvents .plot .marker .guide ->invoke (
4646 Events::OnLineDrawParam (" plot.marker.guide.x" ,
4747 line,
4848 marker.idx ))) {
@@ -58,7 +58,7 @@ void drawItem::drawLines(const Styles::Guide &style,
5858 canvas.setLineColor (lineColor);
5959 auto axisPoint = blended.center .yComp () + origo.xComp ();
6060 Geom::Line line (blended.center , axisPoint);
61- if (events .plot .marker .guide ->invoke (
61+ if (rootEvents .plot .marker .guide ->invoke (
6262 Events::OnLineDrawParam (" plot.marker.guide.y" ,
6363 line,
6464 marker.idx ))) {
@@ -181,7 +181,7 @@ void drawItem::draw(const DrawItem &drawItem,
181181 auto colors = getColor (drawItem, factor);
182182
183183 canvas.setLineColor (colors.first );
184- canvas.setLineWidth (*style .plot .marker .borderWidth );
184+ canvas.setLineWidth (*rootStyle .plot .marker .borderWidth );
185185 canvas.setBrushColor (colors.second );
186186
187187 auto boundary = drawItem.getBoundary ();
@@ -196,7 +196,7 @@ void drawItem::draw(const DrawItem &drawItem,
196196 auto p0 = coordSys.convert (line.begin );
197197 auto p1 = coordSys.convert (line.end );
198198
199- if (events .plot .marker .base ->invoke (
199+ if (rootEvents .plot .marker .base ->invoke (
200200 Events::OnLineDrawParam (" plot.marker" ,
201201 Geom::Line (p0, p1),
202202 drawItem.marker .idx ))) {
@@ -208,7 +208,7 @@ void drawItem::draw(const DrawItem &drawItem,
208208 }
209209 }
210210 else {
211- if (events .plot .marker .base ->invoke (
211+ if (rootEvents .plot .marker .base ->invoke (
212212 Events::OnRectDrawParam (" plot.marker" ,
213213 rect,
214214 drawItem.marker .idx ))) {
@@ -230,7 +230,7 @@ void drawItem::drawLabel(const DrawItem &drawItem, size_t index)
230230 auto text = getLabelText (index);
231231 if (text.empty ()) return ;
232232
233- auto &labelStyle = style .plot .marker .label ;
233+ auto &labelStyle = rootStyle .plot .marker .label ;
234234
235235 auto labelPos = labelStyle.position ->combine <Geom::Line>(
236236 [&](int , const auto &position)
@@ -250,7 +250,7 @@ void drawItem::drawLabel(const DrawItem &drawItem, size_t index)
250250 text,
251251 labelPos,
252252 labelStyle,
253- events .plot .marker .label ,
253+ rootEvents .plot .marker .label ,
254254 std::move (param),
255255 centered,
256256 textColor,
@@ -259,7 +259,7 @@ void drawItem::drawLabel(const DrawItem &drawItem, size_t index)
259259
260260std::string drawItem::getLabelText (size_t index) const
261261{
262- auto &labelStyle = style .plot .marker .label ;
262+ auto &labelStyle = rootStyle .plot .marker .label ;
263263 auto &values = marker.label .values ;
264264
265265 auto needsInterpolation = marker.label .count == 2
@@ -318,14 +318,14 @@ std::pair<Gfx::Color, Gfx::Color> drawItem::getColor(
318318{
319319 auto selectedColor = getSelectedColor ();
320320
321- auto borderAlpha = *style .plot .marker .borderOpacity ;
322- auto fillAlpha = *style .plot .marker .fillOpacity ;
321+ auto borderAlpha = *rootStyle .plot .marker .borderOpacity ;
322+ auto fillAlpha = *rootStyle .plot .marker .fillOpacity ;
323323
324324 auto fakeBgColor =
325- (*style .backgroundColor + *style .plot .backgroundColor )
325+ (*rootStyle .backgroundColor + *rootStyle .plot .backgroundColor )
326326 .transparent (1.0 );
327327
328- auto borderColor = style .plot .marker .borderOpacityMode ->combine <
328+ auto borderColor = rootStyle .plot .marker .borderOpacityMode ->combine <
329329 Gfx::Color>(
330330 [&](int , const auto &mode)
331331 {
0 commit comments