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

native canvas emulator

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@57982 954022d7-b5bf-4e40-9824-e11837661b57
parent acee490b
...@@ -1936,8 +1936,8 @@ namespace NSEditorApi ...@@ -1936,8 +1936,8 @@ namespace NSEditorApi
{ {
public: public:
unsigned char* Data; unsigned char* Data;
unsigned int Width; int Width;
unsigned int Height; int Height;
bool Release; bool Release;
...@@ -2010,6 +2010,41 @@ namespace NSEditorApi ...@@ -2010,6 +2010,41 @@ namespace NSEditorApi
typedef CAscMethodParamInt CAscInsertPageNumber; typedef CAscMethodParamInt CAscInsertPageNumber;
} }
namespace NSEditorApi
{
class CAscParagraphStyleImage
{
public:
std::wstring Name;
int Type;
int Priority;
CAscImageRaw Image;
public:
CAscParagraphStyleImage()
{
Type = c_oAscStyleImage_Default;
Priority = 0;
}
};
class CAscTableStyleImage
{
public:
std::wstring Name;
int Type;
CAscImageRaw Image;
public:
CAscTableStyleImage()
{
Type = c_oAscStyleImage_Default;
}
};
}
namespace NSEditorApi namespace NSEditorApi
{ {
class CAscStylesTemplate class CAscStylesTemplate
......
...@@ -411,7 +411,7 @@ public: ...@@ -411,7 +411,7 @@ public:
case 0: case 0:
{ {
// left // left
double _left = __x1 + 0.5; double _left = (int)__x1 + 0.5;
_left = _left + pen_w / 2.0 - 0.5; _left = _left + pen_w / 2.0 - 0.5;
m_pPath->Reset(); m_pPath->Reset();
...@@ -423,7 +423,7 @@ public: ...@@ -423,7 +423,7 @@ public:
case 1: case 1:
{ {
// center // center
double _center = __x1 + 0.5; double _center = (int)__x1 + 0.5;
m_pPath->Reset(); m_pPath->Reset();
if (0 == (pen_w % 2)) if (0 == (pen_w % 2))
...@@ -443,7 +443,7 @@ public: ...@@ -443,7 +443,7 @@ public:
case 2: case 2:
{ {
// right // right
double _right = __x1 + 0.5; double _right = (int)__x1 + 0.5;
_right = _right - pen_w / 2.0 + 0.5; _right = _right - pen_w / 2.0 + 0.5;
m_pPath->Reset(); m_pPath->Reset();
...@@ -486,14 +486,7 @@ public: ...@@ -486,14 +486,7 @@ public:
} }
else else
{ {
if ((pen_mw % 2) == 0) _x = _center + ((pen_mw - 1) >> 1);
{
_x = _center + ((pen_mw >> 1) - 1.0);
}
else
{
_x = _center + (pen_mw >> 1);
}
} }
} }
if (rightMW != 0) if (rightMW != 0)
...@@ -510,14 +503,7 @@ public: ...@@ -510,14 +503,7 @@ public:
} }
else else
{ {
if ((pen_mw % 2) == 0) _r = _center + ((pen_mw - 1) >> 1);
{
_r = _center + (pen_mw >> 1) - 1.0;
}
else
{
_r = _center + (pen_mw >> 1);
}
} }
} }
......
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