This commit is contained in:
Kamil Kerimov
2025-01-31 03:40:47 +05:00
parent 81a4d9ccd0
commit b65ed1ccb4

View File

@ -301,8 +301,14 @@ void Compute_GradientFill(draw_gradient* gradient_style, oox::oox_gradient_fill_
if (gradient_style->draw_style_)
style = gradient_style->draw_style_->get_type();
if (gradient_style->draw_angle_)
fill->angle = -90 - gradient_style->draw_angle_->get_value();
if (gradient_style->draw_angle_)
{
double angle = std::fmod(gradient_style->draw_angle_->get_value(), 360.0);
if (angle < 0)
angle += 360.0;
fill->angle = -angle + 90;
}
if (fill->angle < 0)
fill->angle += 360;
@ -317,7 +323,7 @@ void Compute_GradientFill(draw_gradient* gradient_style, oox::oox_gradient_fill_
if (gradient_stop->color_value_)
fill->colors[i].color_ref = gradient_stop->color_value_->get_hex_value();
if (gradient_stop->svg_offset_)
fill->colors[i].pos = 100 - *gradient_stop->svg_offset_ * 100;
fill->colors[i].pos = *gradient_stop->svg_offset_ * 100;
}
}
fill->style = 0;