This commit is contained in:
Elena Subbotina
2025-12-15 21:07:19 +03:00
parent b369c32e9e
commit 4c9a24bf71
3 changed files with 10 additions and 6 deletions

View File

@ -730,6 +730,7 @@ namespace ODRAW
Gdiplus::RectF Rect; Gdiplus::RectF Rect;
double LinearAngle; double LinearAngle;
int Focus;
std::vector<std::pair<CColor, double>> ColorsPosition; std::vector<std::pair<CColor, double>> ColorsPosition;
@ -815,6 +816,7 @@ namespace ODRAW
TextureMode = c_BrushTextureModeStretch; TextureMode = c_BrushTextureModeStretch;
LinearAngle = 0; LinearAngle = 0;
Focus = 0;
TexturePath = L""; TexturePath = L"";

View File

@ -349,17 +349,18 @@ std::wstring PPT::CShapeWriter::ConvertBrush(CBrush & brush)
brush_writer.WriteString(L"</a:gsLst>"); brush_writer.WriteString(L"</a:gsLst>");
brush_writer.WriteString(L"<a:lin ang=\""); brush_writer.WriteString(L"<a:lin ang=\"");
{ {
if (brush.LinearAngle < -180) brush.LinearAngle += 180; double val = 360 - brush.LinearAngle;
if (brush.LinearAngle > 180) brush.LinearAngle -= 180; val += 90;
double val = (90 - brush.LinearAngle) ; if (val < 0) val += 360;
if (val < 0) val = 0; if (val >= 360) val -= 360;
if (val > 360) val -= 360;
std::wstring str = std::to_wstring((int)(val * 60000)); std::wstring str = std::to_wstring((int)(val * 60000));
brush_writer.WriteString(str); brush_writer.WriteString(str);
} }
brush_writer.WriteString(L"\" scaled=\"1\"/>"); brush_writer.WriteString(L"\"");
//brush_writer.WriteString(L" scaled = \"1\"");
brush_writer.WriteString(L"/>");
brush_writer.WriteString(L"</a:gradFill>"); brush_writer.WriteString(L"</a:gradFill>");
} }
else if(brush.Type == c_BrushTypePattern) else if(brush.Type == c_BrushTypePattern)

View File

@ -513,6 +513,7 @@ void CPPTElement::SetUpProperty(CElementPtr pElement, CTheme* pTheme, CSlideInfo
}break; }break;
case fillFocus://relative position of the last color in the shaded fill case fillFocus://relative position of the last color in the shaded fill
{ {
pElement->m_oBrush.Focus = pProperty->m_lValue;
}break; }break;
case fillShadePreset: case fillShadePreset:
{//value (int) from 0x00000088 through 0x0000009F or complex {//value (int) from 0x00000088 through 0x0000009F or complex