wrapper all functions

This commit is contained in:
Kulikova Svetlana
2020-10-12 15:15:52 +03:00
parent 8aed2ec3f0
commit f74105a8ad
4 changed files with 2375 additions and 137 deletions

File diff suppressed because it is too large Load Diff

View File

@ -108,6 +108,58 @@ public:
void FillTextCode(double x, double y, const v8::Local<v8::Value>& lUnicode);
void tg(const v8::Local<v8::Value>& text, double x, double y);
void charspace(const v8::Local<v8::Value>& space) {}
// private methods
void private_FillGlyph(const v8::Local<v8::Value>& pGlyph, const v8::Local<v8::Value>& _bounds);
void private_FillGlyphC(const v8::Local<v8::Value>& pGlyph, double cropX, double cropW);
void private_FillGlyph2(const v8::Local<v8::Value>& pGlyph);
void SetIntegerGrid(bool param);
bool GetIntegerGrid();
void DrawStringASCII(const std::string& name, int size, bool bold, bool italic, const v8::Local<v8::Value>& text, double x, double y, bool bIsHeader);
void DrawStringASCII2(const std::string& name, int size, bool bold, bool italic, const v8::Local<v8::Value>& text, double x, double y, bool bIsHeader);
void DrawHeaderEdit(double yPos, const v8::Local<v8::Value>& lock_type, int sectionNum, bool bIsRepeat, const v8::Local<v8::Value>& type);
void DrawFooterEdit(double yPos, const v8::Local<v8::Value>& lock_type, int sectionNum, bool bIsRepeat, const v8::Local<v8::Value>& type);
void DrawLockParagraph(const v8::Local<v8::Value>& lock_type, double x, double y1, double y2);
void DrawLockObjectRect(const v8::Local<v8::Value>& lock_type, double x, double y, double w, double h);
void DrawEmptyTableLine(double x1, double y1, double x2, double y2);
void DrawSpellingLine(double y0, double x0, double x1, double w);
// smart methods for horizontal / vertical lines
void drawHorLine(int align, double y, double x, double r, int penW);
void drawHorLine2(int align, double y, double x, double r, int penW);
void drawVerLine(int align, double x, double y, double b, int penW);
// мега крутые функции для таблиц
void drawHorLineExt(int align, double y, double x, double r, int penW, double leftMW, double rightMW);
void rect(double x, double y, double w, double h);
void TableRect(double x, double y, double w, double h);
// функции клиппирования
void AddClipRect(double x, double y, double w, double h);
void RemoveClipRect() {}
void SetClip(const v8::Local<v8::Value>& r);
void RemoveClip();
void drawCollaborativeChanges(double x, double y, double w, double h, const v8::Local<v8::Value>& Color);
void drawMailMergeField(double x, double y, double w, double h);
void drawSearchResult(double x, double y, double w, double h);
void drawFlowAnchor(double x, double y);
void SavePen();
void RestorePen();
void SaveBrush();
void RestoreBrush();
void SavePenBrush();
void RestorePenBrush();
void SaveGrState();
void RestoreGrState();
void StartClipPath() {}
void EndClipPath();
void StartCheckTableDraw();
void EndCheckTableDraw(bool bIsRestore);
void SetTextClipRect(double _l, double _t, double _r, double _b);
void AddSmartRect(double x, double y, double w, double h, int pen_w);
void CheckUseFonts2(const v8::Local<v8::Value>& _transform);
void UncheckUseFonts2();
void Drawing_StartCheckBounds(double x, double y, double w, double h) {}
void Drawing_EndCheckBounds() {}
void DrawPresentationComment(const v8::Local<v8::Value>& type, double x, double y, double w, double h);
void DrawPolygon(const v8::Local<v8::Value>& oPath, int lineWidth, double shift);
void DrawFootnoteRect(double x, double y, double w, double h);
double m_dDpiX_get() { return m_dDpiX; }
int globalAlpha_get() { return globalAlpha; }

View File

@ -1,21 +1,30 @@
#include "graphics_wrapper.h"
double to_double(const v8::Local<v8::Value>& v)
#include <string>
static double to_double(const v8::Local<v8::Value>& v)
{
return v->ToNumber(v8::Isolate::GetCurrent()->GetCurrentContext()).FromMaybe(v8::Local<v8::Number>())->Value();
}
bool to_bool (const v8::Local<v8::Value>& v)
static bool to_bool (const v8::Local<v8::Value>& v)
{
return v->ToBoolean(v8::Isolate::GetCurrent()->GetCurrentContext()).FromMaybe(v8::Local<v8::Boolean>())->Value();
}
int to_int (const v8::Local<v8::Value>& v)
static int to_int (const v8::Local<v8::Value>& v)
{
return v->ToInt32(v8::Isolate::GetCurrent()->GetCurrentContext()).FromMaybe(v8::Local<v8::Int32>())->Value();
}
int to_uint (const v8::Local<v8::Value>& v)
static int to_uint (const v8::Local<v8::Value>& v)
{
return v->ToUint32(v8::Isolate::GetCurrent()->GetCurrentContext()).FromMaybe(v8::Local<v8::Uint32>())->Value();
}
static std::string to_string(const v8::Local<v8::Value>& v)
{
v8::String::Utf8Value data(v);
const char* p = *data;
if (p == NULL) return std::string();
return std::string(p);
}
CJSGraphics* unwrap_Graphics(v8::Handle<v8::Object> obj)
{
@ -23,7 +32,7 @@ CJSGraphics* unwrap_Graphics(v8::Handle<v8::Object> obj)
return static_cast<CJSGraphics*>(field->Value());
}
void init_w (const v8::FunctionCallbackInfo<v8::Value>& args)
void init_w (const v8::FunctionCallbackInfo<v8::Value>& args)
{
args.GetReturnValue().Set(v8::Undefined(v8::Isolate::GetCurrent()));
if (args.Length() < 5)
@ -31,13 +40,13 @@ void init_w (const v8::FunctionCallbackInfo<v8::Value>& args)
CJSGraphics* pGraphics = unwrap_Graphics(args.This());
pGraphics->init(args[0], to_double(args[1]), to_double(args[2]), to_double(args[3]), to_double(args[4]));
}
void EndDraw_w (const v8::FunctionCallbackInfo<v8::Value>& args)
void EndDraw_w (const v8::FunctionCallbackInfo<v8::Value>& args)
{
args.GetReturnValue().Set(v8::Undefined(v8::Isolate::GetCurrent()));
CJSGraphics* pGraphics = unwrap_Graphics(args.This());
pGraphics->EndDraw();
}
void put_GlobalAlpha_w (const v8::FunctionCallbackInfo<v8::Value>& args)
void put_GlobalAlpha_w (const v8::FunctionCallbackInfo<v8::Value>& args)
{
args.GetReturnValue().Set(v8::Undefined(v8::Isolate::GetCurrent()));
if (args.Length() < 2)
@ -45,19 +54,19 @@ void put_GlobalAlpha_w (const v8::FunctionCallbackInfo<v8::Value>& args)
CJSGraphics* pGraphics = unwrap_Graphics(args.This());
pGraphics->put_GlobalAlpha(to_bool(args[0]), to_int(args[1]));
}
void Start_GlobalAlpha_w (const v8::FunctionCallbackInfo<v8::Value>& args)
void Start_GlobalAlpha_w (const v8::FunctionCallbackInfo<v8::Value>& args)
{
args.GetReturnValue().Set(v8::Undefined(v8::Isolate::GetCurrent()));
CJSGraphics* pGraphics = unwrap_Graphics(args.This());
pGraphics->Start_GlobalAlpha();
}
void End_GlobalAlpha_w (const v8::FunctionCallbackInfo<v8::Value>& args)
void End_GlobalAlpha_w (const v8::FunctionCallbackInfo<v8::Value>& args)
{
args.GetReturnValue().Set(v8::Undefined(v8::Isolate::GetCurrent()));
CJSGraphics* pGraphics = unwrap_Graphics(args.This());
pGraphics->End_GlobalAlpha();
}
void p_color_w (const v8::FunctionCallbackInfo<v8::Value>& args)
void p_color_w (const v8::FunctionCallbackInfo<v8::Value>& args)
{
args.GetReturnValue().Set(v8::Undefined(v8::Isolate::GetCurrent()));
if (args.Length() < 4)
@ -65,7 +74,7 @@ void p_color_w (const v8::FunctionCallbackInfo<v8::Value>& args)
CJSGraphics* pGraphics = unwrap_Graphics(args.This());
pGraphics->p_color(to_int(args[0]), to_int(args[1]), to_int(args[2]), to_int(args[3]));
}
void p_width_w (const v8::FunctionCallbackInfo<v8::Value>& args)
void p_width_w (const v8::FunctionCallbackInfo<v8::Value>& args)
{
args.GetReturnValue().Set(v8::Undefined(v8::Isolate::GetCurrent()));
if (args.Length() < 1)
@ -73,7 +82,7 @@ void p_width_w (const v8::FunctionCallbackInfo<v8::Value>& args)
CJSGraphics* pGraphics = unwrap_Graphics(args.This());
pGraphics->p_width(to_int(args[0]));
}
void p_dash_w (const v8::FunctionCallbackInfo<v8::Value>& args)
void p_dash_w (const v8::FunctionCallbackInfo<v8::Value>& args)
{
args.GetReturnValue().Set(v8::Undefined(v8::Isolate::GetCurrent()));
if (args.Length() < 1)
@ -81,7 +90,7 @@ void p_dash_w (const v8::FunctionCallbackInfo<v8::Value>& args)
CJSGraphics* pGraphics = unwrap_Graphics(args.This());
pGraphics->p_dash(args[0]);
}
void b_color1_w (const v8::FunctionCallbackInfo<v8::Value>& args)
void b_color1_w (const v8::FunctionCallbackInfo<v8::Value>& args)
{
args.GetReturnValue().Set(v8::Undefined(v8::Isolate::GetCurrent()));
if (args.Length() < 4)
@ -89,7 +98,7 @@ void b_color1_w (const v8::FunctionCallbackInfo<v8::Value>& args)
CJSGraphics* pGraphics = unwrap_Graphics(args.This());
pGraphics->b_color1(to_int(args[0]), to_int(args[1]), to_int(args[2]), to_int(args[3]));
}
void b_color2_w (const v8::FunctionCallbackInfo<v8::Value>& args)
void b_color2_w (const v8::FunctionCallbackInfo<v8::Value>& args)
{
args.GetReturnValue().Set(v8::Undefined(v8::Isolate::GetCurrent()));
if (args.Length() < 4)
@ -97,7 +106,7 @@ void b_color2_w (const v8::FunctionCallbackInfo<v8::Value>& args)
CJSGraphics* pGraphics = unwrap_Graphics(args.This());
pGraphics->b_color2(to_int(args[0]), to_int(args[1]), to_int(args[2]), to_int(args[3]));
}
void transform_w (const v8::FunctionCallbackInfo<v8::Value>& args)
void transform_w (const v8::FunctionCallbackInfo<v8::Value>& args)
{
args.GetReturnValue().Set(v8::Undefined(v8::Isolate::GetCurrent()));
if (args.Length() < 6)
@ -105,7 +114,7 @@ void transform_w (const v8::FunctionCallbackInfo<v8::Value>& args)
CJSGraphics* pGraphics = unwrap_Graphics(args.This());
pGraphics->transform(to_double(args[0]), to_double(args[1]), to_double(args[2]), to_double(args[3]), to_double(args[4]), to_double(args[5]));
}
void CalculateFullTransform_w(const v8::FunctionCallbackInfo<v8::Value>& args)
void CalculateFullTransform_w (const v8::FunctionCallbackInfo<v8::Value>& args)
{
args.GetReturnValue().Set(v8::Undefined(v8::Isolate::GetCurrent()));
if (args.Length() < 1)
@ -113,25 +122,25 @@ void CalculateFullTransform_w(const v8::FunctionCallbackInfo<v8::Value>& args)
CJSGraphics* pGraphics = unwrap_Graphics(args.This());
pGraphics->CalculateFullTransform(to_bool(args[0]));
}
void _s_w (const v8::FunctionCallbackInfo<v8::Value>& args)
void _s_w (const v8::FunctionCallbackInfo<v8::Value>& args)
{
args.GetReturnValue().Set(v8::Undefined(v8::Isolate::GetCurrent()));
CJSGraphics* pGraphics = unwrap_Graphics(args.This());
pGraphics->_s();
}
void _e_w (const v8::FunctionCallbackInfo<v8::Value>& args)
void _e_w (const v8::FunctionCallbackInfo<v8::Value>& args)
{
args.GetReturnValue().Set(v8::Undefined(v8::Isolate::GetCurrent()));
CJSGraphics* pGraphics = unwrap_Graphics(args.This());
pGraphics->_e();
}
void _z_w (const v8::FunctionCallbackInfo<v8::Value>& args)
void _z_w (const v8::FunctionCallbackInfo<v8::Value>& args)
{
args.GetReturnValue().Set(v8::Undefined(v8::Isolate::GetCurrent()));
CJSGraphics* pGraphics = unwrap_Graphics(args.This());
pGraphics->_z();
}
void _m_w (const v8::FunctionCallbackInfo<v8::Value>& args)
void _m_w (const v8::FunctionCallbackInfo<v8::Value>& args)
{
args.GetReturnValue().Set(v8::Undefined(v8::Isolate::GetCurrent()));
if (args.Length() < 2)
@ -139,7 +148,7 @@ void _m_w (const v8::FunctionCallbackInfo<v8::Value>& args)
CJSGraphics* pGraphics = unwrap_Graphics(args.This());
pGraphics->_m(to_double(args[0]), to_double(args[1]));
}
void _l_w (const v8::FunctionCallbackInfo<v8::Value>& args)
void _l_w (const v8::FunctionCallbackInfo<v8::Value>& args)
{
args.GetReturnValue().Set(v8::Undefined(v8::Isolate::GetCurrent()));
if (args.Length() < 2)
@ -147,7 +156,7 @@ void _l_w (const v8::FunctionCallbackInfo<v8::Value>& args)
CJSGraphics* pGraphics = unwrap_Graphics(args.This());
pGraphics->_l(to_double(args[0]), to_double(args[1]));
}
void _c_w (const v8::FunctionCallbackInfo<v8::Value>& args)
void _c_w (const v8::FunctionCallbackInfo<v8::Value>& args)
{
args.GetReturnValue().Set(v8::Undefined(v8::Isolate::GetCurrent()));
if (args.Length() < 6)
@ -155,7 +164,7 @@ void _c_w (const v8::FunctionCallbackInfo<v8::Value>& args)
CJSGraphics* pGraphics = unwrap_Graphics(args.This());
pGraphics->_c(to_double(args[0]), to_double(args[1]), to_double(args[2]), to_double(args[3]), to_double(args[4]), to_double(args[5]));
}
void _c2_w (const v8::FunctionCallbackInfo<v8::Value>& args)
void _c2_w (const v8::FunctionCallbackInfo<v8::Value>& args)
{
args.GetReturnValue().Set(v8::Undefined(v8::Isolate::GetCurrent()));
if (args.Length() < 4)
@ -163,43 +172,43 @@ void _c2_w (const v8::FunctionCallbackInfo<v8::Value>& args)
CJSGraphics* pGraphics = unwrap_Graphics(args.This());
pGraphics->_c2(to_double(args[0]), to_double(args[1]), to_double(args[2]), to_double(args[3]));
}
void ds_w (const v8::FunctionCallbackInfo<v8::Value>& args)
void ds_w (const v8::FunctionCallbackInfo<v8::Value>& args)
{
args.GetReturnValue().Set(v8::Undefined(v8::Isolate::GetCurrent()));
CJSGraphics* pGraphics = unwrap_Graphics(args.This());
pGraphics->ds();
}
void df_w (const v8::FunctionCallbackInfo<v8::Value>& args)
void df_w (const v8::FunctionCallbackInfo<v8::Value>& args)
{
args.GetReturnValue().Set(v8::Undefined(v8::Isolate::GetCurrent()));
CJSGraphics* pGraphics = unwrap_Graphics(args.This());
pGraphics->df();
}
void save_w (const v8::FunctionCallbackInfo<v8::Value>& args)
void save_w (const v8::FunctionCallbackInfo<v8::Value>& args)
{
args.GetReturnValue().Set(v8::Undefined(v8::Isolate::GetCurrent()));
CJSGraphics* pGraphics = unwrap_Graphics(args.This());
pGraphics->save();
}
void restore_w (const v8::FunctionCallbackInfo<v8::Value>& args)
void restore_w (const v8::FunctionCallbackInfo<v8::Value>& args)
{
args.GetReturnValue().Set(v8::Undefined(v8::Isolate::GetCurrent()));
CJSGraphics* pGraphics = unwrap_Graphics(args.This());
pGraphics->restore();
}
void clip_w (const v8::FunctionCallbackInfo<v8::Value>& args)
void clip_w (const v8::FunctionCallbackInfo<v8::Value>& args)
{
args.GetReturnValue().Set(v8::Undefined(v8::Isolate::GetCurrent()));
CJSGraphics* pGraphics = unwrap_Graphics(args.This());
pGraphics->clip();
}
void reset_w (const v8::FunctionCallbackInfo<v8::Value>& args)
void reset_w (const v8::FunctionCallbackInfo<v8::Value>& args)
{
args.GetReturnValue().Set(v8::Undefined(v8::Isolate::GetCurrent()));
CJSGraphics* pGraphics = unwrap_Graphics(args.This());
pGraphics->reset();
}
void transform3_w (const v8::FunctionCallbackInfo<v8::Value>& args)
void transform3_w (const v8::FunctionCallbackInfo<v8::Value>& args)
{
args.GetReturnValue().Set(v8::Undefined(v8::Isolate::GetCurrent()));
if (args.Length() < 2)
@ -207,19 +216,19 @@ void transform3_w (const v8::FunctionCallbackInfo<v8::Value>& args)
CJSGraphics* pGraphics = unwrap_Graphics(args.This());
pGraphics->transform3(args[0], to_bool(args[1]));
}
void FreeFont_w (const v8::FunctionCallbackInfo<v8::Value>& args)
void FreeFont_w (const v8::FunctionCallbackInfo<v8::Value>& args)
{
args.GetReturnValue().Set(v8::Undefined(v8::Isolate::GetCurrent()));
CJSGraphics* pGraphics = unwrap_Graphics(args.This());
pGraphics->FreeFont();
}
void ClearLastFont_w (const v8::FunctionCallbackInfo<v8::Value>& args)
void ClearLastFont_w (const v8::FunctionCallbackInfo<v8::Value>& args)
{
args.GetReturnValue().Set(v8::Undefined(v8::Isolate::GetCurrent()));
CJSGraphics* pGraphics = unwrap_Graphics(args.This());
pGraphics->ClearLastFont();
}
void drawImage2_w (const v8::FunctionCallbackInfo<v8::Value>& args)
void drawImage2_w (const v8::FunctionCallbackInfo<v8::Value>& args)
{
args.GetReturnValue().Set(v8::Undefined(v8::Isolate::GetCurrent()));
if (args.Length() < 7)
@ -227,7 +236,7 @@ void drawImage2_w (const v8::FunctionCallbackInfo<v8::Value>& args)
CJSGraphics* pGraphics = unwrap_Graphics(args.This());
pGraphics->drawImage2(args[0], to_double(args[1]), to_double(args[2]), to_double(args[3]), to_double(args[4]), to_int(args[5]), args[6]);
}
void drawImage_w (const v8::FunctionCallbackInfo<v8::Value>& args)
void drawImage_w (const v8::FunctionCallbackInfo<v8::Value>& args)
{
args.GetReturnValue().Set(v8::Undefined(v8::Isolate::GetCurrent()));
if (args.Length() < 8)
@ -235,13 +244,13 @@ void drawImage_w (const v8::FunctionCallbackInfo<v8::Value>& args)
CJSGraphics* pGraphics = unwrap_Graphics(args.This());
pGraphics->drawImage(args[0], to_double(args[1]), to_double(args[2]), to_double(args[3]), to_double(args[4]), to_int(args[5]), args[6], args[7]);
}
void GetFont_w (const v8::FunctionCallbackInfo<v8::Value>& args)
void GetFont_w (const v8::FunctionCallbackInfo<v8::Value>& args)
{
args.GetReturnValue().Set(v8::Undefined(v8::Isolate::GetCurrent()));
CJSGraphics* pGraphics = unwrap_Graphics(args.This());
pGraphics->GetFont();
}
void font_w (const v8::FunctionCallbackInfo<v8::Value>& args)
void font_w (const v8::FunctionCallbackInfo<v8::Value>& args)
{
args.GetReturnValue().Set(v8::Undefined(v8::Isolate::GetCurrent()));
if (args.Length() < 2)
@ -249,7 +258,7 @@ void font_w (const v8::FunctionCallbackInfo<v8::Value>& args)
CJSGraphics* pGraphics = unwrap_Graphics(args.This());
pGraphics->font(to_uint(args[0]), to_int(args[1]));
}
void SetFont_w (const v8::FunctionCallbackInfo<v8::Value>& args)
void SetFont_w (const v8::FunctionCallbackInfo<v8::Value>& args)
{
args.GetReturnValue().Set(v8::Undefined(v8::Isolate::GetCurrent()));
if (args.Length() < 1)
@ -257,7 +266,7 @@ void SetFont_w (const v8::FunctionCallbackInfo<v8::Value>& args)
CJSGraphics* pGraphics = unwrap_Graphics(args.This());
pGraphics->SetFont(args[0]);
}
void SetTextPr_w (const v8::FunctionCallbackInfo<v8::Value>& args)
void SetTextPr_w (const v8::FunctionCallbackInfo<v8::Value>& args)
{
args.GetReturnValue().Set(v8::Undefined(v8::Isolate::GetCurrent()));
if (args.Length() < 2)
@ -267,7 +276,7 @@ void SetTextPr_w (const v8::FunctionCallbackInfo<v8::Value>& args)
v8::Local<v8::Value> args1 = args[1];
pGraphics->SetTextPr(&args0, &args1);
}
void SetFontSlot_w (const v8::FunctionCallbackInfo<v8::Value>& args)
void SetFontSlot_w (const v8::FunctionCallbackInfo<v8::Value>& args)
{
args.GetReturnValue().Set(v8::Undefined(v8::Isolate::GetCurrent()));
if (args.Length() < 2)
@ -275,13 +284,13 @@ void SetFontSlot_w (const v8::FunctionCallbackInfo<v8::Value>& args)
CJSGraphics* pGraphics = unwrap_Graphics(args.This());
pGraphics->SetFontSlot(args[0], to_double(args[1]));
}
void GetTextPr_w (const v8::FunctionCallbackInfo<v8::Value>& args)
void GetTextPr_w (const v8::FunctionCallbackInfo<v8::Value>& args)
{
args.GetReturnValue().Set(v8::Undefined(v8::Isolate::GetCurrent()));
CJSGraphics* pGraphics = unwrap_Graphics(args.This());
pGraphics->GetTextPr();
}
void FillText_w (const v8::FunctionCallbackInfo<v8::Value>& args)
void FillText_w (const v8::FunctionCallbackInfo<v8::Value>& args)
{
args.GetReturnValue().Set(v8::Undefined(v8::Isolate::GetCurrent()));
if (args.Length() < 3)
@ -289,7 +298,7 @@ void FillText_w (const v8::FunctionCallbackInfo<v8::Value>& args)
CJSGraphics* pGraphics = unwrap_Graphics(args.This());
pGraphics->FillText(to_double(args[0]), to_double(args[1]), args[2]);
}
void t_w (const v8::FunctionCallbackInfo<v8::Value>& args)
void t_w (const v8::FunctionCallbackInfo<v8::Value>& args)
{
args.GetReturnValue().Set(v8::Undefined(v8::Isolate::GetCurrent()));
if (args.Length() < 4)
@ -297,7 +306,7 @@ void t_w (const v8::FunctionCallbackInfo<v8::Value>& args)
CJSGraphics* pGraphics = unwrap_Graphics(args.This());
pGraphics->t(args[0], to_double(args[1]), to_double(args[2]), to_bool(args[3]));
}
void FillText2_w (const v8::FunctionCallbackInfo<v8::Value>& args)
void FillText2_w (const v8::FunctionCallbackInfo<v8::Value>& args)
{
args.GetReturnValue().Set(v8::Undefined(v8::Isolate::GetCurrent()));
if (args.Length() < 5)
@ -305,7 +314,7 @@ void FillText2_w (const v8::FunctionCallbackInfo<v8::Value>& args)
CJSGraphics* pGraphics = unwrap_Graphics(args.This());
pGraphics->FillText2(to_double(args[0]), to_double(args[1]), args[2], to_double(args[3]), to_double(args[4]));
}
void t2_w (const v8::FunctionCallbackInfo<v8::Value>& args)
void t2_w (const v8::FunctionCallbackInfo<v8::Value>& args)
{
args.GetReturnValue().Set(v8::Undefined(v8::Isolate::GetCurrent()));
if (args.Length() < 5)
@ -313,7 +322,7 @@ void t2_w (const v8::FunctionCallbackInfo<v8::Value>& args)
CJSGraphics* pGraphics = unwrap_Graphics(args.This());
pGraphics->t2(args[0], to_double(args[1]), to_double(args[2]), to_double(args[3]), to_double(args[4]));
}
void FillTextCode_w (const v8::FunctionCallbackInfo<v8::Value>& args)
void FillTextCode_w (const v8::FunctionCallbackInfo<v8::Value>& args)
{
args.GetReturnValue().Set(v8::Undefined(v8::Isolate::GetCurrent()));
if (args.Length() < 3)
@ -321,7 +330,7 @@ void FillTextCode_w (const v8::FunctionCallbackInfo<v8::Value>& args)
CJSGraphics* pGraphics = unwrap_Graphics(args.This());
pGraphics->FillTextCode(to_double(args[0]), to_double(args[1]), args[2]);
}
void tg_w (const v8::FunctionCallbackInfo<v8::Value>& args)
void tg_w (const v8::FunctionCallbackInfo<v8::Value>& args)
{
args.GetReturnValue().Set(v8::Undefined(v8::Isolate::GetCurrent()));
if (args.Length() < 3)
@ -329,7 +338,7 @@ void tg_w (const v8::FunctionCallbackInfo<v8::Value>& args)
CJSGraphics* pGraphics = unwrap_Graphics(args.This());
pGraphics->tg(args[0], to_double(args[1]), to_double(args[2]));
}
void charspace_w (const v8::FunctionCallbackInfo<v8::Value>& args)
void charspace_w (const v8::FunctionCallbackInfo<v8::Value>& args)
{
args.GetReturnValue().Set(v8::Undefined(v8::Isolate::GetCurrent()));
if (args.Length() < 1)
@ -337,6 +346,358 @@ void charspace_w (const v8::FunctionCallbackInfo<v8::Value>& args)
CJSGraphics* pGraphics = unwrap_Graphics(args.This());
pGraphics->charspace(args[0]);
}
void private_FillGlyph_w (const v8::FunctionCallbackInfo<v8::Value>& args)
{
args.GetReturnValue().Set(v8::Undefined(v8::Isolate::GetCurrent()));
if (args.Length() < 2)
return;
CJSGraphics* pGraphics = unwrap_Graphics(args.This());
pGraphics->private_FillGlyph(args[0], args[1]);
}
void private_FillGlyphC_w (const v8::FunctionCallbackInfo<v8::Value>& args)
{
args.GetReturnValue().Set(v8::Undefined(v8::Isolate::GetCurrent()));
if (args.Length() < 3)
return;
CJSGraphics* pGraphics = unwrap_Graphics(args.This());
pGraphics->private_FillGlyphC(args[0], to_double(args[1]), to_double(args[2]));
}
void private_FillGlyph2_w (const v8::FunctionCallbackInfo<v8::Value>& args)
{
args.GetReturnValue().Set(v8::Undefined(v8::Isolate::GetCurrent()));
if (args.Length() < 1)
return;
CJSGraphics* pGraphics = unwrap_Graphics(args.This());
pGraphics->private_FillGlyph2(args[0]);
}
void SetIntegerGrid_w (const v8::FunctionCallbackInfo<v8::Value>& args)
{
args.GetReturnValue().Set(v8::Undefined(v8::Isolate::GetCurrent()));
if (args.Length() < 1)
return;
CJSGraphics* pGraphics = unwrap_Graphics(args.This());
pGraphics->SetIntegerGrid(to_bool(args[0]));
}
void GetIntegerGrid_w (const v8::FunctionCallbackInfo<v8::Value>& args)
{
args.GetReturnValue().Set(v8::Undefined(v8::Isolate::GetCurrent()));
CJSGraphics* pGraphics = unwrap_Graphics(args.This());
pGraphics->GetIntegerGrid();
}
void DrawStringASCII_w (const v8::FunctionCallbackInfo<v8::Value>& args)
{
args.GetReturnValue().Set(v8::Undefined(v8::Isolate::GetCurrent()));
if (args.Length() < 8)
return;
CJSGraphics* pGraphics = unwrap_Graphics(args.This());
pGraphics->DrawStringASCII(to_string(args[0]), to_int(args[1]), to_bool(args[2]), to_bool(args[3]), args[4], to_double(args[5]), to_double(args[6]), to_bool(args[7]));
}
void DrawStringASCII2_w (const v8::FunctionCallbackInfo<v8::Value>& args)
{
args.GetReturnValue().Set(v8::Undefined(v8::Isolate::GetCurrent()));
if (args.Length() < 8)
return;
CJSGraphics* pGraphics = unwrap_Graphics(args.This());
pGraphics->DrawStringASCII2(to_string(args[0]), to_int(args[1]), to_bool(args[2]), to_bool(args[3]), args[4], to_double(args[5]), to_double(args[6]), to_bool(args[7]));
}
void DrawHeaderEdit_w (const v8::FunctionCallbackInfo<v8::Value>& args)
{
args.GetReturnValue().Set(v8::Undefined(v8::Isolate::GetCurrent()));
if (args.Length() < 5)
return;
CJSGraphics* pGraphics = unwrap_Graphics(args.This());
pGraphics->DrawHeaderEdit(to_double(args[0]), args[1], to_int(args[2]), to_bool(args[3]), args[4]);
}
void DrawFooterEdit_w (const v8::FunctionCallbackInfo<v8::Value>& args)
{
args.GetReturnValue().Set(v8::Undefined(v8::Isolate::GetCurrent()));
if (args.Length() < 5)
return;
CJSGraphics* pGraphics = unwrap_Graphics(args.This());
pGraphics->DrawFooterEdit(to_double(args[0]), args[1], to_int(args[2]), to_bool(args[3]), args[4]);
}
void DrawLockParagraph_w (const v8::FunctionCallbackInfo<v8::Value>& args)
{
args.GetReturnValue().Set(v8::Undefined(v8::Isolate::GetCurrent()));
if (args.Length() < 4)
return;
CJSGraphics* pGraphics = unwrap_Graphics(args.This());
pGraphics->DrawLockParagraph(args[0], to_double(args[1]), to_double(args[2]), to_double(args[3]));
}
void DrawLockObjectRect_w (const v8::FunctionCallbackInfo<v8::Value>& args)
{
args.GetReturnValue().Set(v8::Undefined(v8::Isolate::GetCurrent()));
if (args.Length() < 5)
return;
CJSGraphics* pGraphics = unwrap_Graphics(args.This());
pGraphics->DrawLockObjectRect(args[0], to_double(args[1]), to_double(args[2]), to_double(args[3]), to_double(args[4]));
}
void DrawEmptyTableLine_w (const v8::FunctionCallbackInfo<v8::Value>& args)
{
args.GetReturnValue().Set(v8::Undefined(v8::Isolate::GetCurrent()));
if (args.Length() < 4)
return;
CJSGraphics* pGraphics = unwrap_Graphics(args.This());
pGraphics->DrawEmptyTableLine(to_double(args[0]), to_double(args[1]), to_double(args[2]), to_double(args[3]));
}
void DrawSpellingLine_w (const v8::FunctionCallbackInfo<v8::Value>& args)
{
args.GetReturnValue().Set(v8::Undefined(v8::Isolate::GetCurrent()));
if (args.Length() < 4)
return;
CJSGraphics* pGraphics = unwrap_Graphics(args.This());
pGraphics->DrawSpellingLine(to_double(args[0]), to_double(args[1]), to_double(args[2]), to_double(args[3]));
}
void drawHorLine_w (const v8::FunctionCallbackInfo<v8::Value>& args)
{
args.GetReturnValue().Set(v8::Undefined(v8::Isolate::GetCurrent()));
if (args.Length() < 5)
return;
CJSGraphics* pGraphics = unwrap_Graphics(args.This());
pGraphics->drawHorLine(to_int(args[0]), to_double(args[1]), to_double(args[2]), to_double(args[3]), to_int(args[4]));
}
void drawHorLine2_w (const v8::FunctionCallbackInfo<v8::Value>& args)
{
args.GetReturnValue().Set(v8::Undefined(v8::Isolate::GetCurrent()));
if (args.Length() < 5)
return;
CJSGraphics* pGraphics = unwrap_Graphics(args.This());
pGraphics->drawHorLine2(to_int(args[0]), to_double(args[1]), to_double(args[2]), to_double(args[3]), to_int(args[4]));
}
void drawVerLine_w (const v8::FunctionCallbackInfo<v8::Value>& args)
{
args.GetReturnValue().Set(v8::Undefined(v8::Isolate::GetCurrent()));
if (args.Length() < 5)
return;
CJSGraphics* pGraphics = unwrap_Graphics(args.This());
pGraphics->drawVerLine(to_int(args[0]), to_double(args[1]), to_double(args[2]), to_double(args[3]), to_int(args[4]));
}
void drawHorLineExt_w (const v8::FunctionCallbackInfo<v8::Value>& args)
{
args.GetReturnValue().Set(v8::Undefined(v8::Isolate::GetCurrent()));
if (args.Length() < 7)
return;
CJSGraphics* pGraphics = unwrap_Graphics(args.This());
pGraphics->drawHorLineExt(to_int(args[0]), to_double(args[1]), to_double(args[2]), to_double(args[3]), to_int(args[4]), to_double(args[5]), to_double(args[6]));
}
void rect_w (const v8::FunctionCallbackInfo<v8::Value>& args)
{
args.GetReturnValue().Set(v8::Undefined(v8::Isolate::GetCurrent()));
if (args.Length() < 4)
return;
CJSGraphics* pGraphics = unwrap_Graphics(args.This());
pGraphics->rect(to_double(args[0]), to_double(args[1]), to_double(args[2]), to_double(args[3]));
}
void TableRect_w (const v8::FunctionCallbackInfo<v8::Value>& args)
{
args.GetReturnValue().Set(v8::Undefined(v8::Isolate::GetCurrent()));
if (args.Length() < 4)
return;
CJSGraphics* pGraphics = unwrap_Graphics(args.This());
pGraphics->TableRect(to_double(args[0]), to_double(args[1]), to_double(args[2]), to_double(args[3]));
}
void AddClipRect_w (const v8::FunctionCallbackInfo<v8::Value>& args)
{
args.GetReturnValue().Set(v8::Undefined(v8::Isolate::GetCurrent()));
if (args.Length() < 4)
return;
CJSGraphics* pGraphics = unwrap_Graphics(args.This());
pGraphics->AddClipRect(to_double(args[0]), to_double(args[1]), to_double(args[2]), to_double(args[3]));
}
void RemoveClipRect_w (const v8::FunctionCallbackInfo<v8::Value>& args)
{
args.GetReturnValue().Set(v8::Undefined(v8::Isolate::GetCurrent()));
CJSGraphics* pGraphics = unwrap_Graphics(args.This());
pGraphics->RemoveClipRect();
}
void SetClip_w (const v8::FunctionCallbackInfo<v8::Value>& args)
{
args.GetReturnValue().Set(v8::Undefined(v8::Isolate::GetCurrent()));
if (args.Length() < 1)
return;
CJSGraphics* pGraphics = unwrap_Graphics(args.This());
pGraphics->SetClip(args[0]);
}
void RemoveClip_w (const v8::FunctionCallbackInfo<v8::Value>& args)
{
args.GetReturnValue().Set(v8::Undefined(v8::Isolate::GetCurrent()));
CJSGraphics* pGraphics = unwrap_Graphics(args.This());
pGraphics->RemoveClip();
}
void drawCollaborativeChanges_w(const v8::FunctionCallbackInfo<v8::Value>& args)
{
args.GetReturnValue().Set(v8::Undefined(v8::Isolate::GetCurrent()));
if (args.Length() < 5)
return;
CJSGraphics* pGraphics = unwrap_Graphics(args.This());
pGraphics->drawCollaborativeChanges(to_double(args[0]), to_double(args[1]), to_double(args[2]), to_double(args[3]), args[4]);
}
void drawMailMergeField_w (const v8::FunctionCallbackInfo<v8::Value>& args)
{
args.GetReturnValue().Set(v8::Undefined(v8::Isolate::GetCurrent()));
if (args.Length() < 4)
return;
CJSGraphics* pGraphics = unwrap_Graphics(args.This());
pGraphics->drawMailMergeField(to_double(args[0]), to_double(args[1]), to_double(args[2]), to_double(args[3]));
}
void drawSearchResult_w (const v8::FunctionCallbackInfo<v8::Value>& args)
{
args.GetReturnValue().Set(v8::Undefined(v8::Isolate::GetCurrent()));
if (args.Length() < 4)
return;
CJSGraphics* pGraphics = unwrap_Graphics(args.This());
pGraphics->drawSearchResult(to_double(args[0]), to_double(args[1]), to_double(args[2]), to_double(args[3]));
}
void drawFlowAnchor_w (const v8::FunctionCallbackInfo<v8::Value>& args)
{
args.GetReturnValue().Set(v8::Undefined(v8::Isolate::GetCurrent()));
if (args.Length() < 2)
return;
CJSGraphics* pGraphics = unwrap_Graphics(args.This());
pGraphics->drawFlowAnchor(to_double(args[0]), to_double(args[1]));
}
void SavePen_w (const v8::FunctionCallbackInfo<v8::Value>& args)
{
args.GetReturnValue().Set(v8::Undefined(v8::Isolate::GetCurrent()));
CJSGraphics* pGraphics = unwrap_Graphics(args.This());
pGraphics->SavePen();
}
void RestorePen_w (const v8::FunctionCallbackInfo<v8::Value>& args)
{
args.GetReturnValue().Set(v8::Undefined(v8::Isolate::GetCurrent()));
CJSGraphics* pGraphics = unwrap_Graphics(args.This());
pGraphics->RestorePen();
}
void SaveBrush_w (const v8::FunctionCallbackInfo<v8::Value>& args)
{
args.GetReturnValue().Set(v8::Undefined(v8::Isolate::GetCurrent()));
CJSGraphics* pGraphics = unwrap_Graphics(args.This());
pGraphics->SaveBrush();
}
void RestoreBrush_w (const v8::FunctionCallbackInfo<v8::Value>& args)
{
args.GetReturnValue().Set(v8::Undefined(v8::Isolate::GetCurrent()));
CJSGraphics* pGraphics = unwrap_Graphics(args.This());
pGraphics->RestoreBrush();
}
void SavePenBrush_w (const v8::FunctionCallbackInfo<v8::Value>& args)
{
args.GetReturnValue().Set(v8::Undefined(v8::Isolate::GetCurrent()));
CJSGraphics* pGraphics = unwrap_Graphics(args.This());
pGraphics->SavePenBrush();
}
void RestorePenBrush_w (const v8::FunctionCallbackInfo<v8::Value>& args)
{
args.GetReturnValue().Set(v8::Undefined(v8::Isolate::GetCurrent()));
CJSGraphics* pGraphics = unwrap_Graphics(args.This());
pGraphics->RestorePenBrush();
}
void SaveGrState_w (const v8::FunctionCallbackInfo<v8::Value>& args)
{
args.GetReturnValue().Set(v8::Undefined(v8::Isolate::GetCurrent()));
CJSGraphics* pGraphics = unwrap_Graphics(args.This());
pGraphics->SaveGrState();
}
void RestoreGrState_w (const v8::FunctionCallbackInfo<v8::Value>& args)
{
args.GetReturnValue().Set(v8::Undefined(v8::Isolate::GetCurrent()));
CJSGraphics* pGraphics = unwrap_Graphics(args.This());
pGraphics->RestoreGrState();
}
void StartClipPath_w (const v8::FunctionCallbackInfo<v8::Value>& args)
{
args.GetReturnValue().Set(v8::Undefined(v8::Isolate::GetCurrent()));
CJSGraphics* pGraphics = unwrap_Graphics(args.This());
pGraphics->StartClipPath();
}
void EndClipPath_w (const v8::FunctionCallbackInfo<v8::Value>& args)
{
args.GetReturnValue().Set(v8::Undefined(v8::Isolate::GetCurrent()));
CJSGraphics* pGraphics = unwrap_Graphics(args.This());
pGraphics->EndClipPath();
}
void StartCheckTableDraw_w (const v8::FunctionCallbackInfo<v8::Value>& args)
{
args.GetReturnValue().Set(v8::Undefined(v8::Isolate::GetCurrent()));
CJSGraphics* pGraphics = unwrap_Graphics(args.This());
pGraphics->StartCheckTableDraw();
}
void EndCheckTableDraw_w (const v8::FunctionCallbackInfo<v8::Value>& args)
{
args.GetReturnValue().Set(v8::Undefined(v8::Isolate::GetCurrent()));
if (args.Length() < 1)
return;
CJSGraphics* pGraphics = unwrap_Graphics(args.This());
pGraphics->EndCheckTableDraw(to_bool(args[0]));
}
void SetTextClipRect_w (const v8::FunctionCallbackInfo<v8::Value>& args)
{
args.GetReturnValue().Set(v8::Undefined(v8::Isolate::GetCurrent()));
if (args.Length() < 4)
return;
CJSGraphics* pGraphics = unwrap_Graphics(args.This());
pGraphics->SetTextClipRect(to_double(args[0]), to_double(args[1]), to_double(args[2]), to_double(args[3]));
}
void AddSmartRect_w (const v8::FunctionCallbackInfo<v8::Value>& args)
{
args.GetReturnValue().Set(v8::Undefined(v8::Isolate::GetCurrent()));
if (args.Length() < 5)
return;
CJSGraphics* pGraphics = unwrap_Graphics(args.This());
pGraphics->AddSmartRect(to_double(args[0]), to_double(args[1]), to_double(args[2]), to_double(args[3]), to_int(args[4]));
}
void CheckUseFonts2_w (const v8::FunctionCallbackInfo<v8::Value>& args)
{
args.GetReturnValue().Set(v8::Undefined(v8::Isolate::GetCurrent()));
if (args.Length() < 1)
return;
CJSGraphics* pGraphics = unwrap_Graphics(args.This());
pGraphics->CheckUseFonts2(args[0]);
}
void UncheckUseFonts2_w (const v8::FunctionCallbackInfo<v8::Value>& args)
{
args.GetReturnValue().Set(v8::Undefined(v8::Isolate::GetCurrent()));
CJSGraphics* pGraphics = unwrap_Graphics(args.This());
pGraphics->UncheckUseFonts2();
}
void Drawing_StartCheckBounds_w(const v8::FunctionCallbackInfo<v8::Value>& args)
{
args.GetReturnValue().Set(v8::Undefined(v8::Isolate::GetCurrent()));
if (args.Length() < 4)
return;
CJSGraphics* pGraphics = unwrap_Graphics(args.This());
pGraphics->Drawing_StartCheckBounds(to_double(args[0]), to_double(args[1]), to_double(args[2]), to_double(args[3]));
}
void Drawing_EndCheckBounds_w (const v8::FunctionCallbackInfo<v8::Value>& args)
{
args.GetReturnValue().Set(v8::Undefined(v8::Isolate::GetCurrent()));
CJSGraphics* pGraphics = unwrap_Graphics(args.This());
pGraphics->Drawing_EndCheckBounds();
}
void DrawPresentationComment_w (const v8::FunctionCallbackInfo<v8::Value>& args)
{
args.GetReturnValue().Set(v8::Undefined(v8::Isolate::GetCurrent()));
if (args.Length() < 5)
return;
CJSGraphics* pGraphics = unwrap_Graphics(args.This());
pGraphics->DrawPresentationComment(args[0], to_double(args[1]), to_double(args[2]), to_double(args[3]), to_double(args[4]));
}
void DrawPolygon_w (const v8::FunctionCallbackInfo<v8::Value>& args)
{
args.GetReturnValue().Set(v8::Undefined(v8::Isolate::GetCurrent()));
if (args.Length() < 4)
return;
CJSGraphics* pGraphics = unwrap_Graphics(args.This());
pGraphics->DrawPolygon(args[0], to_int(args[1]), to_double(args[2]));
}
void DrawFootnoteRect_w (const v8::FunctionCallbackInfo<v8::Value>& args)
{
args.GetReturnValue().Set(v8::Undefined(v8::Isolate::GetCurrent()));
if (args.Length() < 4)
return;
CJSGraphics* pGraphics = unwrap_Graphics(args.This());
pGraphics->DrawFootnoteRect(to_double(args[0]), to_double(args[1]), to_double(args[2]), to_double(args[3]));
}
void m_dDpiX_get_w (v8::Local<v8::String> _name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
@ -361,49 +722,97 @@ v8::Handle<v8::ObjectTemplate> CreateGraphicsTemplate(v8::Isolate* isolate)
result->SetAccessor(v8::String::NewFromUtf8(current, "globalAlpha"), globalAlpha_get_w);
// методы
result->Set(current, "init", v8::FunctionTemplate::New(current, init_w));
result->Set(current, "EndDraw", v8::FunctionTemplate::New(current, EndDraw_w));
result->Set(current, "put_GlobalAlpha", v8::FunctionTemplate::New(current, put_GlobalAlpha_w));
result->Set(current, "Start_GlobalAlpha", v8::FunctionTemplate::New(current, Start_GlobalAlpha_w));
result->Set(current, "End_GlobalAlpha", v8::FunctionTemplate::New(current, End_GlobalAlpha_w));
result->Set(current, "p_color", v8::FunctionTemplate::New(current, p_color_w));
result->Set(current, "p_width", v8::FunctionTemplate::New(current, p_width_w));
result->Set(current, "p_dash", v8::FunctionTemplate::New(current, p_dash_w));
result->Set(current, "b_color1", v8::FunctionTemplate::New(current, b_color1_w));
result->Set(current, "b_color2", v8::FunctionTemplate::New(current, b_color2_w));
result->Set(current, "transform", v8::FunctionTemplate::New(current, transform_w));
result->Set(current, "CalculateFullTransform", v8::FunctionTemplate::New(current, CalculateFullTransform_w));
result->Set(current, "_s", v8::FunctionTemplate::New(current, _s_w));
result->Set(current, "_e", v8::FunctionTemplate::New(current, _e_w));
result->Set(current, "_z", v8::FunctionTemplate::New(current, _z_w));
result->Set(current, "_m", v8::FunctionTemplate::New(current, _m_w));
result->Set(current, "_l", v8::FunctionTemplate::New(current, _l_w));
result->Set(current, "_c", v8::FunctionTemplate::New(current, _c_w));
result->Set(current, "_c2", v8::FunctionTemplate::New(current, _c2_w));
result->Set(current, "ds", v8::FunctionTemplate::New(current, ds_w));
result->Set(current, "df", v8::FunctionTemplate::New(current, df_w));
result->Set(current, "save", v8::FunctionTemplate::New(current, save_w));
result->Set(current, "restore", v8::FunctionTemplate::New(current, restore_w));
result->Set(current, "clip", v8::FunctionTemplate::New(current, clip_w));
result->Set(current, "reset", v8::FunctionTemplate::New(current, reset_w));
result->Set(current, "transform3", v8::FunctionTemplate::New(current, transform3_w));
result->Set(current, "FreeFont", v8::FunctionTemplate::New(current, FreeFont_w));
result->Set(current, "ClearLastFont", v8::FunctionTemplate::New(current, ClearLastFont_w));
result->Set(current, "drawImage2", v8::FunctionTemplate::New(current, drawImage2_w));
result->Set(current, "drawImage", v8::FunctionTemplate::New(current, drawImage_w));
result->Set(current, "GetFont", v8::FunctionTemplate::New(current, GetFont_w));
result->Set(current, "font", v8::FunctionTemplate::New(current, font_w));
result->Set(current, "SetFont", v8::FunctionTemplate::New(current, SetFont_w));
result->Set(current, "SetTextPr", v8::FunctionTemplate::New(current, SetTextPr_w));
result->Set(current, "SetFontSlot", v8::FunctionTemplate::New(current, SetFontSlot_w));
result->Set(current, "GetTextPr", v8::FunctionTemplate::New(current, GetTextPr_w));
result->Set(current, "FillText", v8::FunctionTemplate::New(current, FillText_w));
result->Set(current, "t", v8::FunctionTemplate::New(current, t_w));
result->Set(current, "FillText2", v8::FunctionTemplate::New(current, FillText2_w));
result->Set(current, "t2", v8::FunctionTemplate::New(current, t2_w));
result->Set(current, "FillTextCode", v8::FunctionTemplate::New(current, FillTextCode_w));
result->Set(current, "tg", v8::FunctionTemplate::New(current, tg_w));
result->Set(current, "charspace", v8::FunctionTemplate::New(current, charspace_w));
result->Set(current, "init", v8::FunctionTemplate::New(current, init_w));
result->Set(current, "EndDraw", v8::FunctionTemplate::New(current, EndDraw_w));
result->Set(current, "put_GlobalAlpha", v8::FunctionTemplate::New(current, put_GlobalAlpha_w));
result->Set(current, "Start_GlobalAlpha", v8::FunctionTemplate::New(current, Start_GlobalAlpha_w));
result->Set(current, "End_GlobalAlpha", v8::FunctionTemplate::New(current, End_GlobalAlpha_w));
result->Set(current, "p_color", v8::FunctionTemplate::New(current, p_color_w));
result->Set(current, "p_width", v8::FunctionTemplate::New(current, p_width_w));
result->Set(current, "p_dash", v8::FunctionTemplate::New(current, p_dash_w));
result->Set(current, "b_color1", v8::FunctionTemplate::New(current, b_color1_w));
result->Set(current, "b_color2", v8::FunctionTemplate::New(current, b_color2_w));
result->Set(current, "transform", v8::FunctionTemplate::New(current, transform_w));
result->Set(current, "CalculateFullTransform", v8::FunctionTemplate::New(current, CalculateFullTransform_w));
result->Set(current, "_s", v8::FunctionTemplate::New(current, _s_w));
result->Set(current, "_e", v8::FunctionTemplate::New(current, _e_w));
result->Set(current, "_z", v8::FunctionTemplate::New(current, _z_w));
result->Set(current, "_m", v8::FunctionTemplate::New(current, _m_w));
result->Set(current, "_l", v8::FunctionTemplate::New(current, _l_w));
result->Set(current, "_c", v8::FunctionTemplate::New(current, _c_w));
result->Set(current, "_c2", v8::FunctionTemplate::New(current, _c2_w));
result->Set(current, "ds", v8::FunctionTemplate::New(current, ds_w));
result->Set(current, "df", v8::FunctionTemplate::New(current, df_w));
result->Set(current, "save", v8::FunctionTemplate::New(current, save_w));
result->Set(current, "restore", v8::FunctionTemplate::New(current, restore_w));
result->Set(current, "clip", v8::FunctionTemplate::New(current, clip_w));
result->Set(current, "reset", v8::FunctionTemplate::New(current, reset_w));
result->Set(current, "transform3", v8::FunctionTemplate::New(current, transform3_w));
result->Set(current, "FreeFont", v8::FunctionTemplate::New(current, FreeFont_w));
result->Set(current, "ClearLastFont", v8::FunctionTemplate::New(current, ClearLastFont_w));
result->Set(current, "drawImage2", v8::FunctionTemplate::New(current, drawImage2_w));
result->Set(current, "drawImage", v8::FunctionTemplate::New(current, drawImage_w));
result->Set(current, "GetFont", v8::FunctionTemplate::New(current, GetFont_w));
result->Set(current, "font", v8::FunctionTemplate::New(current, font_w));
result->Set(current, "SetFont", v8::FunctionTemplate::New(current, SetFont_w));
result->Set(current, "SetTextPr", v8::FunctionTemplate::New(current, SetTextPr_w));
result->Set(current, "SetFontSlot", v8::FunctionTemplate::New(current, SetFontSlot_w));
result->Set(current, "GetTextPr", v8::FunctionTemplate::New(current, GetTextPr_w));
result->Set(current, "FillText", v8::FunctionTemplate::New(current, FillText_w));
result->Set(current, "t", v8::FunctionTemplate::New(current, t_w));
result->Set(current, "FillText2", v8::FunctionTemplate::New(current, FillText2_w));
result->Set(current, "t2", v8::FunctionTemplate::New(current, t2_w));
result->Set(current, "FillTextCode", v8::FunctionTemplate::New(current, FillTextCode_w));
result->Set(current, "tg", v8::FunctionTemplate::New(current, tg_w));
result->Set(current, "charspace", v8::FunctionTemplate::New(current, charspace_w));
result->Set(current, "private_FillGlyph", v8::FunctionTemplate::New(current, private_FillGlyph_w));
result->Set(current, "private_FillGlyphC", v8::FunctionTemplate::New(current, private_FillGlyphC_w));
result->Set(current, "private_FillGlyph2", v8::FunctionTemplate::New(current, private_FillGlyph2_w));
result->Set(current, "SetIntegerGrid", v8::FunctionTemplate::New(current, SetIntegerGrid_w));
result->Set(current, "GetIntegerGrid", v8::FunctionTemplate::New(current, GetIntegerGrid_w));
result->Set(current, "DrawStringASCII", v8::FunctionTemplate::New(current, DrawStringASCII_w));
result->Set(current, "DrawStringASCII2", v8::FunctionTemplate::New(current, DrawStringASCII2_w));
result->Set(current, "DrawHeaderEdit", v8::FunctionTemplate::New(current, DrawHeaderEdit_w));
result->Set(current, "DrawFooterEdit", v8::FunctionTemplate::New(current, DrawFooterEdit_w));
result->Set(current, "DrawLockParagraph", v8::FunctionTemplate::New(current, DrawLockParagraph_w));
result->Set(current, "DrawLockObjectRect", v8::FunctionTemplate::New(current, DrawLockObjectRect_w));
result->Set(current, "DrawEmptyTableLine", v8::FunctionTemplate::New(current, DrawEmptyTableLine_w));
result->Set(current, "DrawSpellingLine", v8::FunctionTemplate::New(current, DrawSpellingLine_w));
result->Set(current, "drawHorLine", v8::FunctionTemplate::New(current, drawHorLine_w));
result->Set(current, "drawHorLine2", v8::FunctionTemplate::New(current, drawHorLine2_w));
result->Set(current, "drawVerLine", v8::FunctionTemplate::New(current, drawVerLine_w));
result->Set(current, "drawHorLineExt", v8::FunctionTemplate::New(current, drawHorLineExt_w));
result->Set(current, "rect", v8::FunctionTemplate::New(current, rect_w));
result->Set(current, "TableRect", v8::FunctionTemplate::New(current, TableRect_w));
result->Set(current, "AddClipRect", v8::FunctionTemplate::New(current, AddClipRect_w));
result->Set(current, "RemoveClipRect", v8::FunctionTemplate::New(current, RemoveClipRect_w));
result->Set(current, "SetClip", v8::FunctionTemplate::New(current, SetClip_w));
result->Set(current, "RemoveClip", v8::FunctionTemplate::New(current, RemoveClip_w));
result->Set(current, "drawCollaborativeChanges", v8::FunctionTemplate::New(current, drawCollaborativeChanges_w));
result->Set(current, "drawMailMergeField", v8::FunctionTemplate::New(current, drawMailMergeField_w));
result->Set(current, "drawSearchResult", v8::FunctionTemplate::New(current, drawSearchResult_w));
result->Set(current, "drawFlowAnchor", v8::FunctionTemplate::New(current, drawFlowAnchor_w));
result->Set(current, "SavePen", v8::FunctionTemplate::New(current, SavePen_w));
result->Set(current, "RestorePen", v8::FunctionTemplate::New(current, RestorePen_w));
result->Set(current, "SaveBrush", v8::FunctionTemplate::New(current, SaveBrush_w));
result->Set(current, "RestoreBrush", v8::FunctionTemplate::New(current, RestoreBrush_w));
result->Set(current, "SavePenBrush", v8::FunctionTemplate::New(current, SavePenBrush_w));
result->Set(current, "RestorePenBrush", v8::FunctionTemplate::New(current, RestorePenBrush_w));
result->Set(current, "SaveGrState", v8::FunctionTemplate::New(current, SaveGrState_w));
result->Set(current, "RestoreGrState", v8::FunctionTemplate::New(current, RestoreGrState_w));
result->Set(current, "StartClipPath", v8::FunctionTemplate::New(current, StartClipPath_w));
result->Set(current, "EndClipPath", v8::FunctionTemplate::New(current, EndClipPath_w));
result->Set(current, "StartCheckTableDraw", v8::FunctionTemplate::New(current, StartCheckTableDraw_w));
result->Set(current, "EndCheckTableDraw", v8::FunctionTemplate::New(current, EndCheckTableDraw_w));
result->Set(current, "SetTextClipRect", v8::FunctionTemplate::New(current, SetTextClipRect_w));
result->Set(current, "AddSmartRect", v8::FunctionTemplate::New(current, AddSmartRect_w));
result->Set(current, "CheckUseFonts2", v8::FunctionTemplate::New(current, CheckUseFonts2_w));
result->Set(current, "UncheckUseFonts2", v8::FunctionTemplate::New(current, UncheckUseFonts2_w));
result->Set(current, "Drawing_StartCheckBounds", v8::FunctionTemplate::New(current, Drawing_StartCheckBounds_w));
result->Set(current, "Drawing_EndCheckBounds", v8::FunctionTemplate::New(current, Drawing_EndCheckBounds_w));
result->Set(current, "DrawPresentationComment", v8::FunctionTemplate::New(current, DrawPresentationComment_w));
result->Set(current, "DrawPolygon", v8::FunctionTemplate::New(current, DrawPolygon_w));
result->Set(current, "DrawFootnoteRect", v8::FunctionTemplate::New(current, DrawFootnoteRect_w));
return result;
}

View File

@ -1,55 +1,106 @@
#include "graphics.h"
double to_double(const v8::Local<v8::Value>& v);
bool to_bool (const v8::Local<v8::Value>& v);
int to_int (const v8::Local<v8::Value>& v);
int to_uint (const v8::Local<v8::Value>& v);
#include <string>
double to_double(const v8::Local<v8::Value>& v);
bool to_bool (const v8::Local<v8::Value>& v);
int to_int (const v8::Local<v8::Value>& v);
int to_uint (const v8::Local<v8::Value>& v);
std::string to_string(const v8::Local<v8::Value>& v);
CJSGraphics* unwrap_Graphics(v8::Handle<v8::Object> obj);
void init_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void EndDraw_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void put_GlobalAlpha_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void Start_GlobalAlpha_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void End_GlobalAlpha_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void p_color_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void p_width_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void p_dash_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void b_color1_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void b_color2_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void transform_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void CalculateFullTransform_w(const v8::FunctionCallbackInfo<v8::Value>& args);
void _s_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void _e_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void _z_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void _m_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void _l_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void _c_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void _c2_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void ds_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void df_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void save_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void restore_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void clip_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void reset_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void transform3_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void FreeFont_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void ClearLastFont_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void drawImage2_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void drawImage_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void GetFont_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void font_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void SetFont_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void SetTextPr_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void SetFontSlot_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void GetTextPr_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void FillText_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void t_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void FillText2_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void t2_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void FillTextCode_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void tg_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void charspace_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void init_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void EndDraw_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void put_GlobalAlpha_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void Start_GlobalAlpha_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void End_GlobalAlpha_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void p_color_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void p_width_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void p_dash_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void b_color1_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void b_color2_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void transform_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void CalculateFullTransform_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void _s_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void _e_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void _z_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void _m_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void _l_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void _c_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void _c2_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void ds_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void df_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void save_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void restore_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void clip_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void reset_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void transform3_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void FreeFont_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void ClearLastFont_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void drawImage2_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void drawImage_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void GetFont_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void font_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void SetFont_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void SetTextPr_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void SetFontSlot_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void GetTextPr_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void FillText_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void t_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void FillText2_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void t2_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void FillTextCode_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void tg_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void charspace_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void private_FillGlyph_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void private_FillGlyphC_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void private_FillGlyph2_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void SetIntegerGrid_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void GetIntegerGrid_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void DrawStringASCII_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void DrawStringASCII2_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void DrawHeaderEdit_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void DrawFooterEdit_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void DrawLockParagraph_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void DrawLockObjectRect_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void DrawEmptyTableLine_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void DrawSpellingLine_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void drawHorLine_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void drawHorLine2_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void drawVerLine_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void drawHorLineExt_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void rect_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void TableRect_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void AddClipRect_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void RemoveClipRect_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void SetClip_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void RemoveClip_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void drawCollaborativeChanges_w(const v8::FunctionCallbackInfo<v8::Value>& args);
void drawMailMergeField_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void drawSearchResult_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void drawFlowAnchor_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void SavePen_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void RestorePen_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void SaveBrush_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void RestoreBrush_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void SavePenBrush_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void RestorePenBrush_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void SaveGrState_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void RestoreGrState_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void StartClipPath_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void EndClipPath_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void StartCheckTableDraw_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void EndCheckTableDraw_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void SetTextClipRect_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void AddSmartRect_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void CheckUseFonts2_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void UncheckUseFonts2_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void Drawing_StartCheckBounds_w(const v8::FunctionCallbackInfo<v8::Value>& args);
void Drawing_EndCheckBounds_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void DrawPresentationComment_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void DrawPolygon_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void DrawFootnoteRect_w (const v8::FunctionCallbackInfo<v8::Value>& args);
void m_dDpiX_get_w (v8::Local<v8::String> _name, const v8::PropertyCallbackInfo<v8::Value>& info);
void globalAlpha_get_w(v8::Local<v8::String> _name, const v8::PropertyCallbackInfo<v8::Value>& info);