mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-04-07 13:55:33 +08:00
fix build
This commit is contained in:
@ -176,6 +176,7 @@ JSSmart<CJSValue> CGraphicsEmbed::SetFont(JSSmart<CJSValue> path, JSSmart<CJSVal
|
|||||||
JSSmart<CJSValue> CGraphicsEmbed::SetTextPr(JSSmart<CJSValue> textPr, JSSmart<CJSValue> theme)
|
JSSmart<CJSValue> CGraphicsEmbed::SetTextPr(JSSmart<CJSValue> textPr, JSSmart<CJSValue> theme)
|
||||||
{
|
{
|
||||||
m_pInternal->SetTextPr();
|
m_pInternal->SetTextPr();
|
||||||
|
return NULL;
|
||||||
}
|
}
|
||||||
JSSmart<CJSValue> CGraphicsEmbed::SetFontSlot(JSSmart<CJSValue> path, JSSmart<CJSValue> face, JSSmart<CJSValue> size, JSSmart<CJSValue> style)
|
JSSmart<CJSValue> CGraphicsEmbed::SetFontSlot(JSSmart<CJSValue> path, JSSmart<CJSValue> face, JSSmart<CJSValue> size, JSSmart<CJSValue> style)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -218,6 +218,11 @@ void CGraphics::SetIntegerGrid(bool param)
|
|||||||
m_pRenderer->put_IntegerGrid(param);
|
m_pRenderer->put_IntegerGrid(param);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool CGraphics::GetIntegerGrid()
|
||||||
|
{
|
||||||
|
return m_pRenderer->get_IntegerGrid();
|
||||||
|
}
|
||||||
|
|
||||||
void CGraphics::DrawHeaderEdit(double yPos, BYTE lock_type)
|
void CGraphics::DrawHeaderEdit(double yPos, BYTE lock_type)
|
||||||
{
|
{
|
||||||
m_pRenderer->PathCommandEnd();
|
m_pRenderer->PathCommandEnd();
|
||||||
|
|||||||
@ -48,7 +48,6 @@ namespace NSGraphics
|
|||||||
CGrStatePenBrush() { m_eType = gstPenBrush; }
|
CGrStatePenBrush() { m_eType = gstPenBrush; }
|
||||||
};
|
};
|
||||||
|
|
||||||
class CGraphics;
|
|
||||||
class CHist_Clip
|
class CHist_Clip
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@ -61,44 +60,32 @@ namespace NSGraphics
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
CHist_Clip() : IsPath(false), Path(NULL), IsIntegerGrid(false) {}
|
CHist_Clip() : IsPath(false), Path(NULL), IsIntegerGrid(false) {}
|
||||||
|
|
||||||
void ToRenderer(CGraphics* pRenderer);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class CGrStateState : public IGrState
|
class CGrStateState : public IGrState
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
Aggplus::CMatrix Transform;
|
||||||
|
bool IsIntegerGrid;
|
||||||
|
std::vector<CHist_Clip*> Clips;
|
||||||
|
|
||||||
|
public:
|
||||||
|
CGrStateState()
|
||||||
{
|
{
|
||||||
public:
|
m_eType = gstState;
|
||||||
Aggplus::CMatrix Transform;
|
IsIntegerGrid = false;
|
||||||
bool IsIntegerGrid;
|
}
|
||||||
std::vector<CHist_Clip*> Clips;
|
~CGrStateState()
|
||||||
|
{
|
||||||
public:
|
size_t nCount = Clips.size();
|
||||||
CGrStateState()
|
for (size_t i = 0; i < nCount; ++i)
|
||||||
{
|
{
|
||||||
m_eType = gstState;
|
CHist_Clip* pClip = Clips[i];
|
||||||
IsIntegerGrid = false;
|
RELEASEOBJECT(pClip);
|
||||||
}
|
}
|
||||||
~CGrStateState()
|
Clips.clear();
|
||||||
{
|
}
|
||||||
size_t nCount = Clips.size();
|
};
|
||||||
for (size_t i = 0; i < nCount; ++i)
|
|
||||||
{
|
|
||||||
CHist_Clip* pClip = Clips[i];
|
|
||||||
RELEASEOBJECT(pClip);
|
|
||||||
}
|
|
||||||
Clips.clear();
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename T>
|
|
||||||
void ApplyClips(T* pRenderer)
|
|
||||||
{
|
|
||||||
size_t nCount = Clips.size();
|
|
||||||
for (size_t i = 0; i < nCount; ++i)
|
|
||||||
{
|
|
||||||
Clips[i]->ToRenderer(pRenderer);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
class CGrState
|
class CGrState
|
||||||
{
|
{
|
||||||
@ -118,28 +105,6 @@ namespace NSGraphics
|
|||||||
RELEASEOBJECT(pState);
|
RELEASEOBJECT(pState);
|
||||||
Clips.clear();
|
Clips.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Save()
|
|
||||||
{
|
|
||||||
SavePen();
|
|
||||||
SaveBrush();
|
|
||||||
SaveGrState();
|
|
||||||
}
|
|
||||||
void Restore()
|
|
||||||
{
|
|
||||||
RestoreGrState();
|
|
||||||
RestoreBrush();
|
|
||||||
RestorePen();
|
|
||||||
}
|
|
||||||
|
|
||||||
void StartClipPath()
|
|
||||||
{
|
|
||||||
// реализовать, как понадобится
|
|
||||||
}
|
|
||||||
void EndClipPath()
|
|
||||||
{
|
|
||||||
// реализовать, как понадобится
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class CGraphics
|
class CGraphics
|
||||||
@ -214,7 +179,7 @@ namespace NSGraphics
|
|||||||
void private_FillGlyphC() {}
|
void private_FillGlyphC() {}
|
||||||
void private_FillGlyph2() {}
|
void private_FillGlyph2() {}
|
||||||
void SetIntegerGrid(bool param);
|
void SetIntegerGrid(bool param);
|
||||||
bool GetIntegerGrid() {}
|
bool GetIntegerGrid();
|
||||||
void DrawStringASCII() {}
|
void DrawStringASCII() {}
|
||||||
void DrawStringASCII2() {}
|
void DrawStringASCII2() {}
|
||||||
void DrawHeaderEdit(double yPos, BYTE lock_type);
|
void DrawHeaderEdit(double yPos, BYTE lock_type);
|
||||||
@ -262,16 +227,6 @@ namespace NSGraphics
|
|||||||
void DrawPolygon() {}
|
void DrawPolygon() {}
|
||||||
void DrawFootnoteRect() {}
|
void DrawFootnoteRect() {}
|
||||||
};
|
};
|
||||||
|
|
||||||
void CHist_Clip::ToRenderer(CGraphics* pRenderer)
|
|
||||||
{
|
|
||||||
if (!IsPath)
|
|
||||||
{
|
|
||||||
pRenderer->StartClipPath();
|
|
||||||
pRenderer->rect(Rect.left, Rect.top, Rect.GetWidth(), Rect.GetHeight());
|
|
||||||
pRenderer->EndClipPath();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // CGRAPHICS_H
|
#endif // CGRAPHICS_H
|
||||||
|
|||||||
Reference in New Issue
Block a user