Commit 48302b8d authored by Oleg.Korshul's avatar Oleg.Korshul Committed by Alexander Trofimov

font_selection.bin в папке с процессом

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@61041 954022d7-b5bf-4e40-9824-e11837661b57
parent a5e0ee8c
......@@ -635,10 +635,10 @@ public:
LONG lFillType = (nType & 0xFF00);
BOOL bIsStroke = (0x01 == (nType & 0x01));
REAL fLeft = 0;
REAL fTop = 0;
REAL fRight = 0;
REAL fBottom = 0;
float fLeft = 0;
float fTop = 0;
float fRight = 0;
float fBottom = 0;
/*Painter::CTextureManager oManager;
......@@ -880,7 +880,7 @@ public:
Gdiplus::Matrix oMatrix;
m_pRenderer->GetTransform(&oMatrix);
REAL buffer[10];
float buffer[10];
oMatrix.GetElements(buffer);
*pdA = (double)buffer[0];
......@@ -930,7 +930,7 @@ public:
pFont->GetFamily(&oFamily);
// -
Gdiplus::REAL fSize = (Gdiplus::REAL)(0.3528 * pFont->GetSize());
float fSize = (float)(0.3528 * pFont->GetSize());
m_pPath->AddString(bsText, nLength, &oFamily, pFont->GetStyle(), fSize, pointOrigin, &m_oFormat);
RELEASEOBJECT(pFont);
......@@ -953,7 +953,7 @@ protected:
void ApplyTransform(double d1, double d2, double d3, double d4, double d5, double d6)
{
Gdiplus::Matrix oMatrix((REAL)d1, (REAL)d2, (REAL)d3, (REAL)d4, (REAL)d5, (REAL)d6);
Gdiplus::Matrix oMatrix((float)d1, (float)d2, (float)d3, (float)d4, (float)d5, (float)d6);
ApplyTransform(&oMatrix);
}
......@@ -965,19 +965,19 @@ protected:
BOOL bFlipX = (0 != (c_nParamFlipX & lFlags));
BOOL bFlipY = (0 != (c_nParamFlipY & lFlags));
REAL m11 = bFlipX ? -1.0f : 1.0f;
REAL m22 = bFlipY ? -1.0f : 1.0f;
float m11 = bFlipX ? -1.0f : 1.0f;
float m22 = bFlipY ? -1.0f : 1.0f;
Gdiplus::Matrix oMatrix(1, 0, 0, 1, 0, 0);
if ((0 != dAngle) || (0 != lFlags))
{
REAL dCentreX = (REAL)(dLeft + dWidth / 2.0);
REAL dCentreY = (REAL)(dTop + dHeight / 2.0);
float dCentreX = (float)(dLeft + dWidth / 2.0);
float dCentreY = (float)(dTop + dHeight / 2.0);
oMatrix.Translate(-dCentreX, -dCentreY , MatrixOrderAppend);
oMatrix.Rotate((REAL)dAngle , MatrixOrderAppend);
oMatrix.Rotate((float)dAngle , MatrixOrderAppend);
oMatrix.Scale(m11, m22 , MatrixOrderAppend);
oMatrix.Translate(dCentreX, dCentreY , MatrixOrderAppend);
......@@ -1046,7 +1046,7 @@ public:
void SetBaseMatrix(const Gdiplus::Matrix& oMatrix)
{
REAL elements[6];
float elements[6];
oMatrix.GetElements(elements);
m_oBaseMatrix.SetElements(elements[0], elements[1], elements[2], elements[3], elements[4], elements[5]);
m_bBaseMatrixUse = TRUE;
......
......@@ -77,7 +77,7 @@ namespace NSStructuresGDI
{
Gdiplus::Color color((BYTE)Alpha, GetRValue(Color), GetGValue(Color), GetBValue(Color));
Gdiplus::Pen* pPen = new Gdiplus::Pen(color, (Gdiplus::REAL)Size);
Gdiplus::Pen* pPen = new Gdiplus::Pen(color, (float)Size);
pPen->SetDashStyle((Gdiplus::DashStyle)DashStyle);
pPen->SetStartCap((Gdiplus::LineCap)LineStartCap);
pPen->SetEndCap((Gdiplus::LineCap)LineEndCap);
......@@ -85,10 +85,10 @@ namespace NSStructuresGDI
if ((Count != 0) && (DashPattern != NULL))
{
Gdiplus::REAL* pPattern = new Gdiplus::REAL[Count];
float* pPattern = new Gdiplus::REAL[Count];
for (long i = 0; i < Count; ++i)
{
pPattern[i] = (Gdiplus::REAL)DashPattern[i];
pPattern[i] = (float)DashPattern[i];
}
pPen->SetDashPattern(pPattern, Count);
......@@ -175,7 +175,7 @@ namespace NSStructuresGDI
if( nAlpha < 0 || nAlpha >= 255 )
return NULL;
Gdiplus::REAL alph = (Gdiplus::REAL)(nAlpha / 255.0);
float alph = (float)(nAlpha / 255.0);
Gdiplus::ColorMatrix colorMatrix = {
1.0f, 0.0f, 0.0f, 0.0f, 0.0f,
0.0f, 1.0f, 0.0f, 0.0f, 0.0f,
......@@ -362,7 +362,7 @@ namespace NSStructuresGDI
if (Strikeout)
style |= Gdiplus::FontStyleStrikeout;
Gdiplus::Font* font = new Gdiplus::Font(family, (Gdiplus::REAL)Size, style, units);
Gdiplus::Font* font = new Gdiplus::Font(family, (float)Size, style, units);
SysFreeString(family);
return font;
......@@ -383,7 +383,7 @@ namespace NSStructuresGDI
if (Strikeout)
style |= Gdiplus::FontStyleStrikeout;
Gdiplus::Font* font = new Gdiplus::Font(family, (Gdiplus::REAL)dSize, style, units);
Gdiplus::Font* font = new Gdiplus::Font(family, (float)dSize, style, units);
SysFreeString(family);
return font;
......@@ -510,7 +510,7 @@ namespace NSStructuresGDI
int offset = int(Dist);
for (int i = 1; i <= offset; i++)
{
Gdiplus::Pen pen(Gdiplus::Color((BYTE)(Alpha*i*alpha/(offset*255)), GetRValue(Color), GetGValue(Color), GetBValue(Color)), (Gdiplus::REAL) 2*(offset - i + 1));
Gdiplus::Pen pen(Gdiplus::Color((BYTE)(Alpha*i*alpha/(offset*255)), GetRValue(Color), GetGValue(Color), GetBValue(Color)), (float) 2*(offset - i + 1));
pen.SetLineCap(Gdiplus::LineCapRound, Gdiplus::LineCapRound, Gdiplus::DashCapRound);
Gr->DrawPath(&pen, &path);
}
......
......@@ -24,6 +24,8 @@
#include "../../../Common/XmlUtils.h"
#include "../../../Common/OfficeDrawing/File.h"
#include "../../DesktopEditor/common/File.h"
#include FT_ADVANCES_H
#include FT_GLYPH_H
......@@ -193,6 +195,22 @@ public:
//----- / --------------------------------------------------------------------
STDMETHOD(Initialize)(BSTR bsXmlOptions)
{
// ,
std::wstring sProcessPath = NSFile::GetProcessDirectory();
CString strFileSelection = (CString)(sProcessPath.c_str());
strFileSelection += _T("\\font_selection.bin");
CFile oFile;
if (S_OK == oFile.OpenFile(strFileSelection))
{
LONG lSize = (LONG)oFile.GetFileSize();
BYTE* pData = new BYTE[lSize];
oFile.ReadFile(pData, (DWORD)lSize);
m_pFontEngine = new CFontEngine(TRUE, TRUE, TRUE, pData, _T(""));
RELEASEARRAYOBJECTS(pData);
return S_OK;
}
BOOL bLoadWinList = TRUE;
CString wsLoadDir = _T("");
......
......@@ -292,14 +292,14 @@ public:
return Ok;
}
Status RotateTransform( REAL angle, MatrixOrder order = MatrixOrderPrepend )
Status RotateTransform( float angle, MatrixOrder order = MatrixOrderPrepend )
{
m_matrix.Rotate( angle, order );
return Ok;
}
Status ScaleTransform( REAL sx, REAL sy, MatrixOrder order = MatrixOrderPrepend )
Status ScaleTransform( float sx, float sy, MatrixOrder order = MatrixOrderPrepend )
{
m_matrix.Scale( sx, sy, order );
......@@ -325,7 +325,7 @@ public:
}
Status SetInterpolationColors( const CColor *presetColors, const REAL *blendPositions, INT count )
Status SetInterpolationColors( const CColor *presetColors, const float *blendPositions, INT count )
{
m_subcolors.RemoveAll();
......@@ -343,7 +343,7 @@ public:
return Ok;
}
Status GetInterpolationColors( CColor *presetColors, REAL *blendPositions, INT count ) const
Status GetInterpolationColors( CColor *presetColors, float *blendPositions, INT count ) const
{
if( count > 0 && count <= (INT)m_subcolors.GetCount() && presetColors && blendPositions )
{
......
......@@ -387,8 +387,8 @@ public:
{
if(!(nTip & agg::path_flags_close))
{
points[k].X = REAL(x);
points[k].Y = REAL(y);
points[k].X = float(x);
points[k].Y = float(y);
++k;
}
}
......
......@@ -160,12 +160,12 @@ public:
Status GetElements(REAL* m) const
{
double M[6]; m_agg_mtx.store_to(M);
m[0]=(REAL)M[0];
m[1]=(REAL)M[1];
m[2]=(REAL)M[2];
m[3]=(REAL)M[3];
m[4]=(REAL)M[4];
m[5]=(REAL)M[5];
m[0]=(float)M[0];
m[1]=(float)M[1];
m[2]=(float)M[2];
m[3]=(float)M[3];
m[4]=(float)M[4];
m[5]=(float)M[5];
return Ok;
}
......
......@@ -2,6 +2,6 @@
//1
//0
//1
//177
#define INTVER 1,0,1,177
#define STRVER "1,0,1,177\0"
//178
#define INTVER 1,0,1,178
#define STRVER "1,0,1,178\0"
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment