/* this file has been autogenerated by vtkNodeJsWrap */
/* editing this might proof futile */

#define VTK_WRAPPING_CXX
#define VTK_STREAMS_FWD_ONLY
#include <nan.h>

#include "vtkActor2DWrap.h"
#include "vtkLegendBoxActorWrap.h"
#include "vtkObjectBaseWrap.h"
#include "vtkPolyDataWrap.h"
#include "vtkImageDataWrap.h"
#include "vtkTextPropertyWrap.h"
#include "vtkProperty2DWrap.h"
#include "vtkPropWrap.h"
#include "vtkWindowWrap.h"
#include "vtkViewportWrap.h"
#include "../../plus/plus.h"

using namespace v8;

extern Nan::Persistent<v8::Object> vtkNodeJsNoWrap;
Nan::Persistent<v8::FunctionTemplate> VtkLegendBoxActorWrap::ptpl;

VtkLegendBoxActorWrap::VtkLegendBoxActorWrap()
{ }

VtkLegendBoxActorWrap::VtkLegendBoxActorWrap(vtkSmartPointer<vtkLegendBoxActor> _native)
{ native = _native; }

VtkLegendBoxActorWrap::~VtkLegendBoxActorWrap()
{ }

void VtkLegendBoxActorWrap::Init(v8::Local<v8::Object> exports)
{
	Nan::SetAccessor(exports, Nan::New("vtkLegendBoxActor").ToLocalChecked(), ConstructorGetter);
	Nan::SetAccessor(exports, Nan::New("LegendBoxActor").ToLocalChecked(), ConstructorGetter);
}

void VtkLegendBoxActorWrap::ConstructorGetter(
	v8::Local<v8::String> property,
	const Nan::PropertyCallbackInfo<v8::Value>& info)
{
	InitPtpl();
	info.GetReturnValue().Set(Nan::New(ptpl)->GetFunction());
}

void VtkLegendBoxActorWrap::InitPtpl()
{
	if (!ptpl.IsEmpty()) return;
	v8::Local<v8::FunctionTemplate> tpl = Nan::New<v8::FunctionTemplate>(New);
	VtkActor2DWrap::InitPtpl( );
	tpl->Inherit(Nan::New<FunctionTemplate>(VtkActor2DWrap::ptpl));
	tpl->SetClassName(Nan::New("VtkLegendBoxActorWrap").ToLocalChecked());
	tpl->InstanceTemplate()->SetInternalFieldCount(1);

	Nan::SetPrototypeMethod(tpl, "BorderOff", BorderOff);
	Nan::SetPrototypeMethod(tpl, "borderOff", BorderOff);

	Nan::SetPrototypeMethod(tpl, "BorderOn", BorderOn);
	Nan::SetPrototypeMethod(tpl, "borderOn", BorderOn);

	Nan::SetPrototypeMethod(tpl, "BoxOff", BoxOff);
	Nan::SetPrototypeMethod(tpl, "boxOff", BoxOff);

	Nan::SetPrototypeMethod(tpl, "BoxOn", BoxOn);
	Nan::SetPrototypeMethod(tpl, "boxOn", BoxOn);

	Nan::SetPrototypeMethod(tpl, "GetBackgroundColor", GetBackgroundColor);
	Nan::SetPrototypeMethod(tpl, "getBackgroundColor", GetBackgroundColor);

	Nan::SetPrototypeMethod(tpl, "GetBackgroundOpacity", GetBackgroundOpacity);
	Nan::SetPrototypeMethod(tpl, "getBackgroundOpacity", GetBackgroundOpacity);

	Nan::SetPrototypeMethod(tpl, "GetBackgroundOpacityMaxValue", GetBackgroundOpacityMaxValue);
	Nan::SetPrototypeMethod(tpl, "getBackgroundOpacityMaxValue", GetBackgroundOpacityMaxValue);

	Nan::SetPrototypeMethod(tpl, "GetBackgroundOpacityMinValue", GetBackgroundOpacityMinValue);
	Nan::SetPrototypeMethod(tpl, "getBackgroundOpacityMinValue", GetBackgroundOpacityMinValue);

	Nan::SetPrototypeMethod(tpl, "GetBorder", GetBorder);
	Nan::SetPrototypeMethod(tpl, "getBorder", GetBorder);

	Nan::SetPrototypeMethod(tpl, "GetBox", GetBox);
	Nan::SetPrototypeMethod(tpl, "getBox", GetBox);

	Nan::SetPrototypeMethod(tpl, "GetBoxProperty", GetBoxProperty);
	Nan::SetPrototypeMethod(tpl, "getBoxProperty", GetBoxProperty);

	Nan::SetPrototypeMethod(tpl, "GetEntryColor", GetEntryColor);
	Nan::SetPrototypeMethod(tpl, "getEntryColor", GetEntryColor);

	Nan::SetPrototypeMethod(tpl, "GetEntryIcon", GetEntryIcon);
	Nan::SetPrototypeMethod(tpl, "getEntryIcon", GetEntryIcon);

	Nan::SetPrototypeMethod(tpl, "GetEntryString", GetEntryString);
	Nan::SetPrototypeMethod(tpl, "getEntryString", GetEntryString);

	Nan::SetPrototypeMethod(tpl, "GetEntrySymbol", GetEntrySymbol);
	Nan::SetPrototypeMethod(tpl, "getEntrySymbol", GetEntrySymbol);

	Nan::SetPrototypeMethod(tpl, "GetEntryTextProperty", GetEntryTextProperty);
	Nan::SetPrototypeMethod(tpl, "getEntryTextProperty", GetEntryTextProperty);

	Nan::SetPrototypeMethod(tpl, "GetLockBorder", GetLockBorder);
	Nan::SetPrototypeMethod(tpl, "getLockBorder", GetLockBorder);

	Nan::SetPrototypeMethod(tpl, "GetNumberOfEntries", GetNumberOfEntries);
	Nan::SetPrototypeMethod(tpl, "getNumberOfEntries", GetNumberOfEntries);

	Nan::SetPrototypeMethod(tpl, "GetPadding", GetPadding);
	Nan::SetPrototypeMethod(tpl, "getPadding", GetPadding);

	Nan::SetPrototypeMethod(tpl, "GetPaddingMaxValue", GetPaddingMaxValue);
	Nan::SetPrototypeMethod(tpl, "getPaddingMaxValue", GetPaddingMaxValue);

	Nan::SetPrototypeMethod(tpl, "GetPaddingMinValue", GetPaddingMinValue);
	Nan::SetPrototypeMethod(tpl, "getPaddingMinValue", GetPaddingMinValue);

	Nan::SetPrototypeMethod(tpl, "GetScalarVisibility", GetScalarVisibility);
	Nan::SetPrototypeMethod(tpl, "getScalarVisibility", GetScalarVisibility);

	Nan::SetPrototypeMethod(tpl, "GetUseBackground", GetUseBackground);
	Nan::SetPrototypeMethod(tpl, "getUseBackground", GetUseBackground);

	Nan::SetPrototypeMethod(tpl, "HasTranslucentPolygonalGeometry", HasTranslucentPolygonalGeometry);
	Nan::SetPrototypeMethod(tpl, "hasTranslucentPolygonalGeometry", HasTranslucentPolygonalGeometry);

	Nan::SetPrototypeMethod(tpl, "LockBorderOff", LockBorderOff);
	Nan::SetPrototypeMethod(tpl, "lockBorderOff", LockBorderOff);

	Nan::SetPrototypeMethod(tpl, "LockBorderOn", LockBorderOn);
	Nan::SetPrototypeMethod(tpl, "lockBorderOn", LockBorderOn);

	Nan::SetPrototypeMethod(tpl, "NewInstance", NewInstance);
	Nan::SetPrototypeMethod(tpl, "newInstance", NewInstance);

	Nan::SetPrototypeMethod(tpl, "ReleaseGraphicsResources", ReleaseGraphicsResources);
	Nan::SetPrototypeMethod(tpl, "releaseGraphicsResources", ReleaseGraphicsResources);

	Nan::SetPrototypeMethod(tpl, "RenderOpaqueGeometry", RenderOpaqueGeometry);
	Nan::SetPrototypeMethod(tpl, "renderOpaqueGeometry", RenderOpaqueGeometry);

	Nan::SetPrototypeMethod(tpl, "RenderOverlay", RenderOverlay);
	Nan::SetPrototypeMethod(tpl, "renderOverlay", RenderOverlay);

	Nan::SetPrototypeMethod(tpl, "RenderTranslucentPolygonalGeometry", RenderTranslucentPolygonalGeometry);
	Nan::SetPrototypeMethod(tpl, "renderTranslucentPolygonalGeometry", RenderTranslucentPolygonalGeometry);

	Nan::SetPrototypeMethod(tpl, "SafeDownCast", SafeDownCast);
	Nan::SetPrototypeMethod(tpl, "safeDownCast", SafeDownCast);

	Nan::SetPrototypeMethod(tpl, "ScalarVisibilityOff", ScalarVisibilityOff);
	Nan::SetPrototypeMethod(tpl, "scalarVisibilityOff", ScalarVisibilityOff);

	Nan::SetPrototypeMethod(tpl, "ScalarVisibilityOn", ScalarVisibilityOn);
	Nan::SetPrototypeMethod(tpl, "scalarVisibilityOn", ScalarVisibilityOn);

	Nan::SetPrototypeMethod(tpl, "SetBackgroundColor", SetBackgroundColor);
	Nan::SetPrototypeMethod(tpl, "setBackgroundColor", SetBackgroundColor);

	Nan::SetPrototypeMethod(tpl, "SetBackgroundOpacity", SetBackgroundOpacity);
	Nan::SetPrototypeMethod(tpl, "setBackgroundOpacity", SetBackgroundOpacity);

	Nan::SetPrototypeMethod(tpl, "SetBorder", SetBorder);
	Nan::SetPrototypeMethod(tpl, "setBorder", SetBorder);

	Nan::SetPrototypeMethod(tpl, "SetBox", SetBox);
	Nan::SetPrototypeMethod(tpl, "setBox", SetBox);

	Nan::SetPrototypeMethod(tpl, "SetEntry", SetEntry);
	Nan::SetPrototypeMethod(tpl, "setEntry", SetEntry);

	Nan::SetPrototypeMethod(tpl, "SetEntryColor", SetEntryColor);
	Nan::SetPrototypeMethod(tpl, "setEntryColor", SetEntryColor);

	Nan::SetPrototypeMethod(tpl, "SetEntryIcon", SetEntryIcon);
	Nan::SetPrototypeMethod(tpl, "setEntryIcon", SetEntryIcon);

	Nan::SetPrototypeMethod(tpl, "SetEntryString", SetEntryString);
	Nan::SetPrototypeMethod(tpl, "setEntryString", SetEntryString);

	Nan::SetPrototypeMethod(tpl, "SetEntrySymbol", SetEntrySymbol);
	Nan::SetPrototypeMethod(tpl, "setEntrySymbol", SetEntrySymbol);

	Nan::SetPrototypeMethod(tpl, "SetEntryTextProperty", SetEntryTextProperty);
	Nan::SetPrototypeMethod(tpl, "setEntryTextProperty", SetEntryTextProperty);

	Nan::SetPrototypeMethod(tpl, "SetLockBorder", SetLockBorder);
	Nan::SetPrototypeMethod(tpl, "setLockBorder", SetLockBorder);

	Nan::SetPrototypeMethod(tpl, "SetNumberOfEntries", SetNumberOfEntries);
	Nan::SetPrototypeMethod(tpl, "setNumberOfEntries", SetNumberOfEntries);

	Nan::SetPrototypeMethod(tpl, "SetPadding", SetPadding);
	Nan::SetPrototypeMethod(tpl, "setPadding", SetPadding);

	Nan::SetPrototypeMethod(tpl, "SetScalarVisibility", SetScalarVisibility);
	Nan::SetPrototypeMethod(tpl, "setScalarVisibility", SetScalarVisibility);

	Nan::SetPrototypeMethod(tpl, "SetUseBackground", SetUseBackground);
	Nan::SetPrototypeMethod(tpl, "setUseBackground", SetUseBackground);

	Nan::SetPrototypeMethod(tpl, "ShallowCopy", ShallowCopy);
	Nan::SetPrototypeMethod(tpl, "shallowCopy", ShallowCopy);

	Nan::SetPrototypeMethod(tpl, "UseBackgroundOff", UseBackgroundOff);
	Nan::SetPrototypeMethod(tpl, "useBackgroundOff", UseBackgroundOff);

	Nan::SetPrototypeMethod(tpl, "UseBackgroundOn", UseBackgroundOn);
	Nan::SetPrototypeMethod(tpl, "useBackgroundOn", UseBackgroundOn);

#ifdef VTK_NODE_PLUS_VTKLEGENDBOXACTORWRAP_INITPTPL
	VTK_NODE_PLUS_VTKLEGENDBOXACTORWRAP_INITPTPL
#endif
	ptpl.Reset( tpl );
}

void VtkLegendBoxActorWrap::New(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	if(!info.IsConstructCall())
	{
		Nan::ThrowError("Constructor not called in a construct call.");
		return;
	}

	if(info.Length() == 0)
	{
		vtkSmartPointer<vtkLegendBoxActor> native = vtkSmartPointer<vtkLegendBoxActor>::New();
		VtkLegendBoxActorWrap* obj = new VtkLegendBoxActorWrap(native);
		obj->Wrap(info.This());
	}
	else
	{
		if(info[0]->ToObject() != vtkNodeJsNoWrap )
		{
			Nan::ThrowError("Parameter Error");
			return;
		}
	}

	info.GetReturnValue().Set(info.This());
}

void VtkLegendBoxActorWrap::BorderOff(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkLegendBoxActorWrap *wrapper = ObjectWrap::Unwrap<VtkLegendBoxActorWrap>(info.Holder());
	vtkLegendBoxActor *native = (vtkLegendBoxActor *)wrapper->native.GetPointer();
		if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	native->BorderOff();
}

void VtkLegendBoxActorWrap::BorderOn(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkLegendBoxActorWrap *wrapper = ObjectWrap::Unwrap<VtkLegendBoxActorWrap>(info.Holder());
	vtkLegendBoxActor *native = (vtkLegendBoxActor *)wrapper->native.GetPointer();
		if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	native->BorderOn();
}

void VtkLegendBoxActorWrap::BoxOff(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkLegendBoxActorWrap *wrapper = ObjectWrap::Unwrap<VtkLegendBoxActorWrap>(info.Holder());
	vtkLegendBoxActor *native = (vtkLegendBoxActor *)wrapper->native.GetPointer();
		if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	native->BoxOff();
}

void VtkLegendBoxActorWrap::BoxOn(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkLegendBoxActorWrap *wrapper = ObjectWrap::Unwrap<VtkLegendBoxActorWrap>(info.Holder());
	vtkLegendBoxActor *native = (vtkLegendBoxActor *)wrapper->native.GetPointer();
		if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	native->BoxOn();
}

void VtkLegendBoxActorWrap::GetBackgroundColor(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkLegendBoxActorWrap *wrapper = ObjectWrap::Unwrap<VtkLegendBoxActorWrap>(info.Holder());
	vtkLegendBoxActor *native = (vtkLegendBoxActor *)wrapper->native.GetPointer();
	double const * r;
	if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	r = native->GetBackgroundColor();
	Local<v8::ArrayBuffer> ab = v8::ArrayBuffer::New(v8::Isolate::GetCurrent(), 3 * sizeof(double));
	Local<v8::Float64Array> at = v8::Float64Array::New(ab, 0, 3);
	memcpy(ab->GetContents().Data(), r, 3 * sizeof(double));
	info.GetReturnValue().Set(at);
}

void VtkLegendBoxActorWrap::GetBackgroundOpacity(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkLegendBoxActorWrap *wrapper = ObjectWrap::Unwrap<VtkLegendBoxActorWrap>(info.Holder());
	vtkLegendBoxActor *native = (vtkLegendBoxActor *)wrapper->native.GetPointer();
	double r;
	if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	r = native->GetBackgroundOpacity();
	info.GetReturnValue().Set(Nan::New(r));
}

void VtkLegendBoxActorWrap::GetBackgroundOpacityMaxValue(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkLegendBoxActorWrap *wrapper = ObjectWrap::Unwrap<VtkLegendBoxActorWrap>(info.Holder());
	vtkLegendBoxActor *native = (vtkLegendBoxActor *)wrapper->native.GetPointer();
	double r;
	if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	r = native->GetBackgroundOpacityMaxValue();
	info.GetReturnValue().Set(Nan::New(r));
}

void VtkLegendBoxActorWrap::GetBackgroundOpacityMinValue(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkLegendBoxActorWrap *wrapper = ObjectWrap::Unwrap<VtkLegendBoxActorWrap>(info.Holder());
	vtkLegendBoxActor *native = (vtkLegendBoxActor *)wrapper->native.GetPointer();
	double r;
	if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	r = native->GetBackgroundOpacityMinValue();
	info.GetReturnValue().Set(Nan::New(r));
}

void VtkLegendBoxActorWrap::GetBorder(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkLegendBoxActorWrap *wrapper = ObjectWrap::Unwrap<VtkLegendBoxActorWrap>(info.Holder());
	vtkLegendBoxActor *native = (vtkLegendBoxActor *)wrapper->native.GetPointer();
	int r;
	if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	r = native->GetBorder();
	info.GetReturnValue().Set(Nan::New(r));
}

void VtkLegendBoxActorWrap::GetBox(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkLegendBoxActorWrap *wrapper = ObjectWrap::Unwrap<VtkLegendBoxActorWrap>(info.Holder());
	vtkLegendBoxActor *native = (vtkLegendBoxActor *)wrapper->native.GetPointer();
	int r;
	if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	r = native->GetBox();
	info.GetReturnValue().Set(Nan::New(r));
}

void VtkLegendBoxActorWrap::GetBoxProperty(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkLegendBoxActorWrap *wrapper = ObjectWrap::Unwrap<VtkLegendBoxActorWrap>(info.Holder());
	vtkLegendBoxActor *native = (vtkLegendBoxActor *)wrapper->native.GetPointer();
	vtkProperty2D * r;
	if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	r = native->GetBoxProperty();
	VtkProperty2DWrap::InitPtpl();
	v8::Local<v8::Value> argv[1] =
		{ Nan::New(vtkNodeJsNoWrap) };
	v8::Local<v8::Function> cons =
		Nan::New<v8::FunctionTemplate>(VtkProperty2DWrap::ptpl)->GetFunction();
	v8::Local<v8::Object> wo = cons->NewInstance(1, argv);
	VtkProperty2DWrap *w = new VtkProperty2DWrap();
	w->native = r;
	w->Wrap(wo);
	info.GetReturnValue().Set(wo);
}

void VtkLegendBoxActorWrap::GetEntryColor(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkLegendBoxActorWrap *wrapper = ObjectWrap::Unwrap<VtkLegendBoxActorWrap>(info.Holder());
	vtkLegendBoxActor *native = (vtkLegendBoxActor *)wrapper->native.GetPointer();
	if(info.Length() > 0 && info[0]->IsInt32())
	{
		double const * r;
		if(info.Length() != 1)
		{
			Nan::ThrowError("Too many parameters.");
			return;
		}
		r = native->GetEntryColor(
			info[0]->Int32Value()
		);
		Local<v8::ArrayBuffer> ab = v8::ArrayBuffer::New(v8::Isolate::GetCurrent(), 3 * sizeof(double));
		Local<v8::Float64Array> at = v8::Float64Array::New(ab, 0, 3);
		memcpy(ab->GetContents().Data(), r, 3 * sizeof(double));
		info.GetReturnValue().Set(at);
		return;
	}
	Nan::ThrowError("Parameter mismatch");
}

void VtkLegendBoxActorWrap::GetEntryIcon(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkLegendBoxActorWrap *wrapper = ObjectWrap::Unwrap<VtkLegendBoxActorWrap>(info.Holder());
	vtkLegendBoxActor *native = (vtkLegendBoxActor *)wrapper->native.GetPointer();
	if(info.Length() > 0 && info[0]->IsInt32())
	{
		vtkImageData * r;
		if(info.Length() != 1)
		{
			Nan::ThrowError("Too many parameters.");
			return;
		}
		r = native->GetEntryIcon(
			info[0]->Int32Value()
		);
		VtkImageDataWrap::InitPtpl();
		v8::Local<v8::Value> argv[1] =
			{ Nan::New(vtkNodeJsNoWrap) };
		v8::Local<v8::Function> cons =
			Nan::New<v8::FunctionTemplate>(VtkImageDataWrap::ptpl)->GetFunction();
		v8::Local<v8::Object> wo = cons->NewInstance(1, argv);
		VtkImageDataWrap *w = new VtkImageDataWrap();
		w->native = r;
		w->Wrap(wo);
		info.GetReturnValue().Set(wo);
		return;
	}
	Nan::ThrowError("Parameter mismatch");
}

void VtkLegendBoxActorWrap::GetEntryString(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkLegendBoxActorWrap *wrapper = ObjectWrap::Unwrap<VtkLegendBoxActorWrap>(info.Holder());
	vtkLegendBoxActor *native = (vtkLegendBoxActor *)wrapper->native.GetPointer();
	if(info.Length() > 0 && info[0]->IsInt32())
	{
		char const * r;
		if(info.Length() != 1)
		{
			Nan::ThrowError("Too many parameters.");
			return;
		}
		r = native->GetEntryString(
			info[0]->Int32Value()
		);
		info.GetReturnValue().Set(Nan::New(r).ToLocalChecked());
		return;
	}
	Nan::ThrowError("Parameter mismatch");
}

void VtkLegendBoxActorWrap::GetEntrySymbol(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkLegendBoxActorWrap *wrapper = ObjectWrap::Unwrap<VtkLegendBoxActorWrap>(info.Holder());
	vtkLegendBoxActor *native = (vtkLegendBoxActor *)wrapper->native.GetPointer();
	if(info.Length() > 0 && info[0]->IsInt32())
	{
		vtkPolyData * r;
		if(info.Length() != 1)
		{
			Nan::ThrowError("Too many parameters.");
			return;
		}
		r = native->GetEntrySymbol(
			info[0]->Int32Value()
		);
		VtkPolyDataWrap::InitPtpl();
		v8::Local<v8::Value> argv[1] =
			{ Nan::New(vtkNodeJsNoWrap) };
		v8::Local<v8::Function> cons =
			Nan::New<v8::FunctionTemplate>(VtkPolyDataWrap::ptpl)->GetFunction();
		v8::Local<v8::Object> wo = cons->NewInstance(1, argv);
		VtkPolyDataWrap *w = new VtkPolyDataWrap();
		w->native = r;
		w->Wrap(wo);
		info.GetReturnValue().Set(wo);
		return;
	}
	Nan::ThrowError("Parameter mismatch");
}

void VtkLegendBoxActorWrap::GetEntryTextProperty(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkLegendBoxActorWrap *wrapper = ObjectWrap::Unwrap<VtkLegendBoxActorWrap>(info.Holder());
	vtkLegendBoxActor *native = (vtkLegendBoxActor *)wrapper->native.GetPointer();
	vtkTextProperty * r;
	if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	r = native->GetEntryTextProperty();
	VtkTextPropertyWrap::InitPtpl();
	v8::Local<v8::Value> argv[1] =
		{ Nan::New(vtkNodeJsNoWrap) };
	v8::Local<v8::Function> cons =
		Nan::New<v8::FunctionTemplate>(VtkTextPropertyWrap::ptpl)->GetFunction();
	v8::Local<v8::Object> wo = cons->NewInstance(1, argv);
	VtkTextPropertyWrap *w = new VtkTextPropertyWrap();
	w->native = r;
	w->Wrap(wo);
	info.GetReturnValue().Set(wo);
}

void VtkLegendBoxActorWrap::GetLockBorder(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkLegendBoxActorWrap *wrapper = ObjectWrap::Unwrap<VtkLegendBoxActorWrap>(info.Holder());
	vtkLegendBoxActor *native = (vtkLegendBoxActor *)wrapper->native.GetPointer();
	int r;
	if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	r = native->GetLockBorder();
	info.GetReturnValue().Set(Nan::New(r));
}

void VtkLegendBoxActorWrap::GetNumberOfEntries(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkLegendBoxActorWrap *wrapper = ObjectWrap::Unwrap<VtkLegendBoxActorWrap>(info.Holder());
	vtkLegendBoxActor *native = (vtkLegendBoxActor *)wrapper->native.GetPointer();
	int r;
	if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	r = native->GetNumberOfEntries();
	info.GetReturnValue().Set(Nan::New(r));
}

void VtkLegendBoxActorWrap::GetPadding(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkLegendBoxActorWrap *wrapper = ObjectWrap::Unwrap<VtkLegendBoxActorWrap>(info.Holder());
	vtkLegendBoxActor *native = (vtkLegendBoxActor *)wrapper->native.GetPointer();
	int r;
	if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	r = native->GetPadding();
	info.GetReturnValue().Set(Nan::New(r));
}

void VtkLegendBoxActorWrap::GetPaddingMaxValue(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkLegendBoxActorWrap *wrapper = ObjectWrap::Unwrap<VtkLegendBoxActorWrap>(info.Holder());
	vtkLegendBoxActor *native = (vtkLegendBoxActor *)wrapper->native.GetPointer();
	int r;
	if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	r = native->GetPaddingMaxValue();
	info.GetReturnValue().Set(Nan::New(r));
}

void VtkLegendBoxActorWrap::GetPaddingMinValue(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkLegendBoxActorWrap *wrapper = ObjectWrap::Unwrap<VtkLegendBoxActorWrap>(info.Holder());
	vtkLegendBoxActor *native = (vtkLegendBoxActor *)wrapper->native.GetPointer();
	int r;
	if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	r = native->GetPaddingMinValue();
	info.GetReturnValue().Set(Nan::New(r));
}

void VtkLegendBoxActorWrap::GetScalarVisibility(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkLegendBoxActorWrap *wrapper = ObjectWrap::Unwrap<VtkLegendBoxActorWrap>(info.Holder());
	vtkLegendBoxActor *native = (vtkLegendBoxActor *)wrapper->native.GetPointer();
	int r;
	if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	r = native->GetScalarVisibility();
	info.GetReturnValue().Set(Nan::New(r));
}

void VtkLegendBoxActorWrap::GetUseBackground(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkLegendBoxActorWrap *wrapper = ObjectWrap::Unwrap<VtkLegendBoxActorWrap>(info.Holder());
	vtkLegendBoxActor *native = (vtkLegendBoxActor *)wrapper->native.GetPointer();
	int r;
	if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	r = native->GetUseBackground();
	info.GetReturnValue().Set(Nan::New(r));
}

void VtkLegendBoxActorWrap::HasTranslucentPolygonalGeometry(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkLegendBoxActorWrap *wrapper = ObjectWrap::Unwrap<VtkLegendBoxActorWrap>(info.Holder());
	vtkLegendBoxActor *native = (vtkLegendBoxActor *)wrapper->native.GetPointer();
	int r;
	if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	r = native->HasTranslucentPolygonalGeometry();
	info.GetReturnValue().Set(Nan::New(r));
}

void VtkLegendBoxActorWrap::LockBorderOff(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkLegendBoxActorWrap *wrapper = ObjectWrap::Unwrap<VtkLegendBoxActorWrap>(info.Holder());
	vtkLegendBoxActor *native = (vtkLegendBoxActor *)wrapper->native.GetPointer();
		if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	native->LockBorderOff();
}

void VtkLegendBoxActorWrap::LockBorderOn(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkLegendBoxActorWrap *wrapper = ObjectWrap::Unwrap<VtkLegendBoxActorWrap>(info.Holder());
	vtkLegendBoxActor *native = (vtkLegendBoxActor *)wrapper->native.GetPointer();
		if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	native->LockBorderOn();
}

void VtkLegendBoxActorWrap::NewInstance(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkLegendBoxActorWrap *wrapper = ObjectWrap::Unwrap<VtkLegendBoxActorWrap>(info.Holder());
	vtkLegendBoxActor *native = (vtkLegendBoxActor *)wrapper->native.GetPointer();
	vtkLegendBoxActor * r;
	if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	r = native->NewInstance();
	VtkLegendBoxActorWrap::InitPtpl();
	v8::Local<v8::Value> argv[1] =
		{ Nan::New(vtkNodeJsNoWrap) };
	v8::Local<v8::Function> cons =
		Nan::New<v8::FunctionTemplate>(VtkLegendBoxActorWrap::ptpl)->GetFunction();
	v8::Local<v8::Object> wo = cons->NewInstance(1, argv);
	VtkLegendBoxActorWrap *w = new VtkLegendBoxActorWrap();
	w->native = r;
	w->Wrap(wo);
	info.GetReturnValue().Set(wo);
}

void VtkLegendBoxActorWrap::ReleaseGraphicsResources(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkLegendBoxActorWrap *wrapper = ObjectWrap::Unwrap<VtkLegendBoxActorWrap>(info.Holder());
	vtkLegendBoxActor *native = (vtkLegendBoxActor *)wrapper->native.GetPointer();
	if(info.Length() > 0 && info[0]->IsObject() && (Nan::New(VtkWindowWrap::ptpl))->HasInstance(info[0]))
	{
		VtkWindowWrap *a0 = ObjectWrap::Unwrap<VtkWindowWrap>(info[0]->ToObject());
				if(info.Length() != 1)
		{
			Nan::ThrowError("Too many parameters.");
			return;
		}
		native->ReleaseGraphicsResources(
			(vtkWindow *) a0->native.GetPointer()
		);
		return;
	}
	Nan::ThrowError("Parameter mismatch");
}

void VtkLegendBoxActorWrap::RenderOpaqueGeometry(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkLegendBoxActorWrap *wrapper = ObjectWrap::Unwrap<VtkLegendBoxActorWrap>(info.Holder());
	vtkLegendBoxActor *native = (vtkLegendBoxActor *)wrapper->native.GetPointer();
	if(info.Length() > 0 && info[0]->IsObject() && (Nan::New(VtkViewportWrap::ptpl))->HasInstance(info[0]))
	{
		VtkViewportWrap *a0 = ObjectWrap::Unwrap<VtkViewportWrap>(info[0]->ToObject());
		int r;
		if(info.Length() != 1)
		{
			Nan::ThrowError("Too many parameters.");
			return;
		}
		r = native->RenderOpaqueGeometry(
			(vtkViewport *) a0->native.GetPointer()
		);
		info.GetReturnValue().Set(Nan::New(r));
		return;
	}
	Nan::ThrowError("Parameter mismatch");
}

void VtkLegendBoxActorWrap::RenderOverlay(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkLegendBoxActorWrap *wrapper = ObjectWrap::Unwrap<VtkLegendBoxActorWrap>(info.Holder());
	vtkLegendBoxActor *native = (vtkLegendBoxActor *)wrapper->native.GetPointer();
	if(info.Length() > 0 && info[0]->IsObject() && (Nan::New(VtkViewportWrap::ptpl))->HasInstance(info[0]))
	{
		VtkViewportWrap *a0 = ObjectWrap::Unwrap<VtkViewportWrap>(info[0]->ToObject());
		int r;
		if(info.Length() != 1)
		{
			Nan::ThrowError("Too many parameters.");
			return;
		}
		r = native->RenderOverlay(
			(vtkViewport *) a0->native.GetPointer()
		);
		info.GetReturnValue().Set(Nan::New(r));
		return;
	}
	Nan::ThrowError("Parameter mismatch");
}

void VtkLegendBoxActorWrap::RenderTranslucentPolygonalGeometry(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkLegendBoxActorWrap *wrapper = ObjectWrap::Unwrap<VtkLegendBoxActorWrap>(info.Holder());
	vtkLegendBoxActor *native = (vtkLegendBoxActor *)wrapper->native.GetPointer();
	if(info.Length() > 0 && info[0]->IsObject() && (Nan::New(VtkViewportWrap::ptpl))->HasInstance(info[0]))
	{
		VtkViewportWrap *a0 = ObjectWrap::Unwrap<VtkViewportWrap>(info[0]->ToObject());
		int r;
		if(info.Length() != 1)
		{
			Nan::ThrowError("Too many parameters.");
			return;
		}
		r = native->RenderTranslucentPolygonalGeometry(
			(vtkViewport *) a0->native.GetPointer()
		);
		info.GetReturnValue().Set(Nan::New(r));
		return;
	}
	Nan::ThrowError("Parameter mismatch");
}

void VtkLegendBoxActorWrap::SafeDownCast(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkLegendBoxActorWrap *wrapper = ObjectWrap::Unwrap<VtkLegendBoxActorWrap>(info.Holder());
	vtkLegendBoxActor *native = (vtkLegendBoxActor *)wrapper->native.GetPointer();
	if(info.Length() > 0 && info[0]->IsObject() && (Nan::New(VtkObjectBaseWrap::ptpl))->HasInstance(info[0]))
	{
		VtkObjectBaseWrap *a0 = ObjectWrap::Unwrap<VtkObjectBaseWrap>(info[0]->ToObject());
		vtkLegendBoxActor * r;
		if(info.Length() != 1)
		{
			Nan::ThrowError("Too many parameters.");
			return;
		}
		r = native->SafeDownCast(
			(vtkObjectBase *) a0->native.GetPointer()
		);
		VtkLegendBoxActorWrap::InitPtpl();
		v8::Local<v8::Value> argv[1] =
			{ Nan::New(vtkNodeJsNoWrap) };
		v8::Local<v8::Function> cons =
			Nan::New<v8::FunctionTemplate>(VtkLegendBoxActorWrap::ptpl)->GetFunction();
		v8::Local<v8::Object> wo = cons->NewInstance(1, argv);
		VtkLegendBoxActorWrap *w = new VtkLegendBoxActorWrap();
		w->native = r;
		w->Wrap(wo);
		info.GetReturnValue().Set(wo);
		return;
	}
	Nan::ThrowError("Parameter mismatch");
}

void VtkLegendBoxActorWrap::ScalarVisibilityOff(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkLegendBoxActorWrap *wrapper = ObjectWrap::Unwrap<VtkLegendBoxActorWrap>(info.Holder());
	vtkLegendBoxActor *native = (vtkLegendBoxActor *)wrapper->native.GetPointer();
		if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	native->ScalarVisibilityOff();
}

void VtkLegendBoxActorWrap::ScalarVisibilityOn(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkLegendBoxActorWrap *wrapper = ObjectWrap::Unwrap<VtkLegendBoxActorWrap>(info.Holder());
	vtkLegendBoxActor *native = (vtkLegendBoxActor *)wrapper->native.GetPointer();
		if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	native->ScalarVisibilityOn();
}

void VtkLegendBoxActorWrap::SetBackgroundColor(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkLegendBoxActorWrap *wrapper = ObjectWrap::Unwrap<VtkLegendBoxActorWrap>(info.Holder());
	vtkLegendBoxActor *native = (vtkLegendBoxActor *)wrapper->native.GetPointer();
	size_t i;
	if(info.Length() > 0 && info[0]->IsFloat64Array())
	{
		v8::Local<v8::Float64Array>a0(v8::Local<v8::Float64Array>::Cast(info[0]->ToObject()));
		if( a0->Length() < 3 )
		{
			Nan::ThrowError("Array too short.");
			return;
		}

				if(info.Length() != 1)
		{
			Nan::ThrowError("Too many parameters.");
			return;
		}
		native->SetBackgroundColor(
			(double *)(a0->Buffer()->GetContents().Data())
		);
		return;
	}
	else if(info.Length() > 0 && info[0]->IsArray())
	{
		v8::Local<v8::Array>a0(v8::Local<v8::Array>::Cast(info[0]->ToObject()));
		double b0[3];
		if( a0->Length() < 3 )
		{
			Nan::ThrowError("Array too short.");
			return;
		}

		for( i = 0; i < 3; i++ )
		{
			if( !a0->Get(i)->IsNumber() )
			{
				Nan::ThrowError("Array contents invalid.");
				return;
			}
			b0[i] = a0->Get(i)->NumberValue();
		}
				if(info.Length() != 1)
		{
			Nan::ThrowError("Too many parameters.");
			return;
		}
		native->SetBackgroundColor(
			b0
		);
		return;
	}
	else if(info.Length() > 0 && info[0]->IsNumber())
	{
		if(info.Length() > 1 && info[1]->IsNumber())
		{
			if(info.Length() > 2 && info[2]->IsNumber())
			{
								if(info.Length() != 3)
				{
					Nan::ThrowError("Too many parameters.");
					return;
				}
				native->SetBackgroundColor(
					info[0]->NumberValue(),
					info[1]->NumberValue(),
					info[2]->NumberValue()
				);
				return;
			}
		}
	}
	Nan::ThrowError("Parameter mismatch");
}

void VtkLegendBoxActorWrap::SetBackgroundOpacity(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkLegendBoxActorWrap *wrapper = ObjectWrap::Unwrap<VtkLegendBoxActorWrap>(info.Holder());
	vtkLegendBoxActor *native = (vtkLegendBoxActor *)wrapper->native.GetPointer();
	if(info.Length() > 0 && info[0]->IsNumber())
	{
				if(info.Length() != 1)
		{
			Nan::ThrowError("Too many parameters.");
			return;
		}
		native->SetBackgroundOpacity(
			info[0]->NumberValue()
		);
		return;
	}
	Nan::ThrowError("Parameter mismatch");
}

void VtkLegendBoxActorWrap::SetBorder(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkLegendBoxActorWrap *wrapper = ObjectWrap::Unwrap<VtkLegendBoxActorWrap>(info.Holder());
	vtkLegendBoxActor *native = (vtkLegendBoxActor *)wrapper->native.GetPointer();
	if(info.Length() > 0 && info[0]->IsInt32())
	{
				if(info.Length() != 1)
		{
			Nan::ThrowError("Too many parameters.");
			return;
		}
		native->SetBorder(
			info[0]->Int32Value()
		);
		return;
	}
	Nan::ThrowError("Parameter mismatch");
}

void VtkLegendBoxActorWrap::SetBox(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkLegendBoxActorWrap *wrapper = ObjectWrap::Unwrap<VtkLegendBoxActorWrap>(info.Holder());
	vtkLegendBoxActor *native = (vtkLegendBoxActor *)wrapper->native.GetPointer();
	if(info.Length() > 0 && info[0]->IsInt32())
	{
				if(info.Length() != 1)
		{
			Nan::ThrowError("Too many parameters.");
			return;
		}
		native->SetBox(
			info[0]->Int32Value()
		);
		return;
	}
	Nan::ThrowError("Parameter mismatch");
}

void VtkLegendBoxActorWrap::SetEntry(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkLegendBoxActorWrap *wrapper = ObjectWrap::Unwrap<VtkLegendBoxActorWrap>(info.Holder());
	vtkLegendBoxActor *native = (vtkLegendBoxActor *)wrapper->native.GetPointer();
	size_t i;
	if(info.Length() > 0 && info[0]->IsInt32())
	{
		if(info.Length() > 1 && info[1]->IsObject() && (Nan::New(VtkImageDataWrap::ptpl))->HasInstance(info[1]))
		{
			VtkImageDataWrap *a1 = ObjectWrap::Unwrap<VtkImageDataWrap>(info[1]->ToObject());
			if(info.Length() > 2 && info[2]->IsString())
			{
				Nan::Utf8String a2(info[2]);
				if(info.Length() > 3 && info[3]->IsFloat64Array())
				{
					v8::Local<v8::Float64Array>a3(v8::Local<v8::Float64Array>::Cast(info[3]->ToObject()));
					if( a3->Length() < 3 )
					{
						Nan::ThrowError("Array too short.");
						return;
					}

										if(info.Length() != 4)
					{
						Nan::ThrowError("Too many parameters.");
						return;
					}
					native->SetEntry(
						info[0]->Int32Value(),
						(vtkImageData *) a1->native.GetPointer(),
						*a2,
						(double *)(a3->Buffer()->GetContents().Data())
					);
					return;
				}
				else if(info.Length() > 3 && info[3]->IsArray())
				{
					v8::Local<v8::Array>a3(v8::Local<v8::Array>::Cast(info[3]->ToObject()));
					double b3[3];
					if( a3->Length() < 3 )
					{
						Nan::ThrowError("Array too short.");
						return;
					}

					for( i = 0; i < 3; i++ )
					{
						if( !a3->Get(i)->IsNumber() )
						{
							Nan::ThrowError("Array contents invalid.");
							return;
						}
						b3[i] = a3->Get(i)->NumberValue();
					}
										if(info.Length() != 4)
					{
						Nan::ThrowError("Too many parameters.");
						return;
					}
					native->SetEntry(
						info[0]->Int32Value(),
						(vtkImageData *) a1->native.GetPointer(),
						*a2,
						b3
					);
					return;
				}
			}
		}
		else if(info.Length() > 1 && info[1]->IsObject() && (Nan::New(VtkPolyDataWrap::ptpl))->HasInstance(info[1]))
		{
			VtkPolyDataWrap *a1 = ObjectWrap::Unwrap<VtkPolyDataWrap>(info[1]->ToObject());
			if(info.Length() > 2 && info[2]->IsString())
			{
				Nan::Utf8String a2(info[2]);
				if(info.Length() > 3 && info[3]->IsFloat64Array())
				{
					v8::Local<v8::Float64Array>a3(v8::Local<v8::Float64Array>::Cast(info[3]->ToObject()));
					if( a3->Length() < 3 )
					{
						Nan::ThrowError("Array too short.");
						return;
					}

										if(info.Length() != 4)
					{
						Nan::ThrowError("Too many parameters.");
						return;
					}
					native->SetEntry(
						info[0]->Int32Value(),
						(vtkPolyData *) a1->native.GetPointer(),
						*a2,
						(double *)(a3->Buffer()->GetContents().Data())
					);
					return;
				}
				else if(info.Length() > 3 && info[3]->IsArray())
				{
					v8::Local<v8::Array>a3(v8::Local<v8::Array>::Cast(info[3]->ToObject()));
					double b3[3];
					if( a3->Length() < 3 )
					{
						Nan::ThrowError("Array too short.");
						return;
					}

					for( i = 0; i < 3; i++ )
					{
						if( !a3->Get(i)->IsNumber() )
						{
							Nan::ThrowError("Array contents invalid.");
							return;
						}
						b3[i] = a3->Get(i)->NumberValue();
					}
										if(info.Length() != 4)
					{
						Nan::ThrowError("Too many parameters.");
						return;
					}
					native->SetEntry(
						info[0]->Int32Value(),
						(vtkPolyData *) a1->native.GetPointer(),
						*a2,
						b3
					);
					return;
				}
			}
			else if(info.Length() > 2 && info[2]->IsObject() && (Nan::New(VtkImageDataWrap::ptpl))->HasInstance(info[2]))
			{
				VtkImageDataWrap *a2 = ObjectWrap::Unwrap<VtkImageDataWrap>(info[2]->ToObject());
				if(info.Length() > 3 && info[3]->IsString())
				{
					Nan::Utf8String a3(info[3]);
					if(info.Length() > 4 && info[4]->IsFloat64Array())
					{
						v8::Local<v8::Float64Array>a4(v8::Local<v8::Float64Array>::Cast(info[4]->ToObject()));
						if( a4->Length() < 3 )
						{
							Nan::ThrowError("Array too short.");
							return;
						}

												if(info.Length() != 5)
						{
							Nan::ThrowError("Too many parameters.");
							return;
						}
						native->SetEntry(
							info[0]->Int32Value(),
							(vtkPolyData *) a1->native.GetPointer(),
							(vtkImageData *) a2->native.GetPointer(),
							*a3,
							(double *)(a4->Buffer()->GetContents().Data())
						);
						return;
					}
					else if(info.Length() > 4 && info[4]->IsArray())
					{
						v8::Local<v8::Array>a4(v8::Local<v8::Array>::Cast(info[4]->ToObject()));
						double b4[3];
						if( a4->Length() < 3 )
						{
							Nan::ThrowError("Array too short.");
							return;
						}

						for( i = 0; i < 3; i++ )
						{
							if( !a4->Get(i)->IsNumber() )
							{
								Nan::ThrowError("Array contents invalid.");
								return;
							}
							b4[i] = a4->Get(i)->NumberValue();
						}
												if(info.Length() != 5)
						{
							Nan::ThrowError("Too many parameters.");
							return;
						}
						native->SetEntry(
							info[0]->Int32Value(),
							(vtkPolyData *) a1->native.GetPointer(),
							(vtkImageData *) a2->native.GetPointer(),
							*a3,
							b4
						);
						return;
					}
				}
			}
		}
	}
	Nan::ThrowError("Parameter mismatch");
}

void VtkLegendBoxActorWrap::SetEntryColor(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkLegendBoxActorWrap *wrapper = ObjectWrap::Unwrap<VtkLegendBoxActorWrap>(info.Holder());
	vtkLegendBoxActor *native = (vtkLegendBoxActor *)wrapper->native.GetPointer();
	size_t i;
	if(info.Length() > 0 && info[0]->IsInt32())
	{
		if(info.Length() > 1 && info[1]->IsFloat64Array())
		{
			v8::Local<v8::Float64Array>a1(v8::Local<v8::Float64Array>::Cast(info[1]->ToObject()));
			if( a1->Length() < 3 )
			{
				Nan::ThrowError("Array too short.");
				return;
			}

						if(info.Length() != 2)
			{
				Nan::ThrowError("Too many parameters.");
				return;
			}
			native->SetEntryColor(
				info[0]->Int32Value(),
				(double *)(a1->Buffer()->GetContents().Data())
			);
			return;
		}
		else if(info.Length() > 1 && info[1]->IsArray())
		{
			v8::Local<v8::Array>a1(v8::Local<v8::Array>::Cast(info[1]->ToObject()));
			double b1[3];
			if( a1->Length() < 3 )
			{
				Nan::ThrowError("Array too short.");
				return;
			}

			for( i = 0; i < 3; i++ )
			{
				if( !a1->Get(i)->IsNumber() )
				{
					Nan::ThrowError("Array contents invalid.");
					return;
				}
				b1[i] = a1->Get(i)->NumberValue();
			}
						if(info.Length() != 2)
			{
				Nan::ThrowError("Too many parameters.");
				return;
			}
			native->SetEntryColor(
				info[0]->Int32Value(),
				b1
			);
			return;
		}
		else if(info.Length() > 1 && info[1]->IsNumber())
		{
			if(info.Length() > 2 && info[2]->IsNumber())
			{
				if(info.Length() > 3 && info[3]->IsNumber())
				{
										if(info.Length() != 4)
					{
						Nan::ThrowError("Too many parameters.");
						return;
					}
					native->SetEntryColor(
						info[0]->Int32Value(),
						info[1]->NumberValue(),
						info[2]->NumberValue(),
						info[3]->NumberValue()
					);
					return;
				}
			}
		}
	}
	Nan::ThrowError("Parameter mismatch");
}

void VtkLegendBoxActorWrap::SetEntryIcon(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkLegendBoxActorWrap *wrapper = ObjectWrap::Unwrap<VtkLegendBoxActorWrap>(info.Holder());
	vtkLegendBoxActor *native = (vtkLegendBoxActor *)wrapper->native.GetPointer();
	if(info.Length() > 0 && info[0]->IsInt32())
	{
		if(info.Length() > 1 && info[1]->IsObject() && (Nan::New(VtkImageDataWrap::ptpl))->HasInstance(info[1]))
		{
			VtkImageDataWrap *a1 = ObjectWrap::Unwrap<VtkImageDataWrap>(info[1]->ToObject());
						if(info.Length() != 2)
			{
				Nan::ThrowError("Too many parameters.");
				return;
			}
			native->SetEntryIcon(
				info[0]->Int32Value(),
				(vtkImageData *) a1->native.GetPointer()
			);
			return;
		}
	}
	Nan::ThrowError("Parameter mismatch");
}

void VtkLegendBoxActorWrap::SetEntryString(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkLegendBoxActorWrap *wrapper = ObjectWrap::Unwrap<VtkLegendBoxActorWrap>(info.Holder());
	vtkLegendBoxActor *native = (vtkLegendBoxActor *)wrapper->native.GetPointer();
	if(info.Length() > 0 && info[0]->IsInt32())
	{
		if(info.Length() > 1 && info[1]->IsString())
		{
			Nan::Utf8String a1(info[1]);
						if(info.Length() != 2)
			{
				Nan::ThrowError("Too many parameters.");
				return;
			}
			native->SetEntryString(
				info[0]->Int32Value(),
				*a1
			);
			return;
		}
	}
	Nan::ThrowError("Parameter mismatch");
}

void VtkLegendBoxActorWrap::SetEntrySymbol(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkLegendBoxActorWrap *wrapper = ObjectWrap::Unwrap<VtkLegendBoxActorWrap>(info.Holder());
	vtkLegendBoxActor *native = (vtkLegendBoxActor *)wrapper->native.GetPointer();
	if(info.Length() > 0 && info[0]->IsInt32())
	{
		if(info.Length() > 1 && info[1]->IsObject() && (Nan::New(VtkPolyDataWrap::ptpl))->HasInstance(info[1]))
		{
			VtkPolyDataWrap *a1 = ObjectWrap::Unwrap<VtkPolyDataWrap>(info[1]->ToObject());
						if(info.Length() != 2)
			{
				Nan::ThrowError("Too many parameters.");
				return;
			}
			native->SetEntrySymbol(
				info[0]->Int32Value(),
				(vtkPolyData *) a1->native.GetPointer()
			);
			return;
		}
	}
	Nan::ThrowError("Parameter mismatch");
}

void VtkLegendBoxActorWrap::SetEntryTextProperty(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkLegendBoxActorWrap *wrapper = ObjectWrap::Unwrap<VtkLegendBoxActorWrap>(info.Holder());
	vtkLegendBoxActor *native = (vtkLegendBoxActor *)wrapper->native.GetPointer();
	if(info.Length() > 0 && info[0]->IsObject() && (Nan::New(VtkTextPropertyWrap::ptpl))->HasInstance(info[0]))
	{
		VtkTextPropertyWrap *a0 = ObjectWrap::Unwrap<VtkTextPropertyWrap>(info[0]->ToObject());
				if(info.Length() != 1)
		{
			Nan::ThrowError("Too many parameters.");
			return;
		}
		native->SetEntryTextProperty(
			(vtkTextProperty *) a0->native.GetPointer()
		);
		return;
	}
	Nan::ThrowError("Parameter mismatch");
}

void VtkLegendBoxActorWrap::SetLockBorder(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkLegendBoxActorWrap *wrapper = ObjectWrap::Unwrap<VtkLegendBoxActorWrap>(info.Holder());
	vtkLegendBoxActor *native = (vtkLegendBoxActor *)wrapper->native.GetPointer();
	if(info.Length() > 0 && info[0]->IsInt32())
	{
				if(info.Length() != 1)
		{
			Nan::ThrowError("Too many parameters.");
			return;
		}
		native->SetLockBorder(
			info[0]->Int32Value()
		);
		return;
	}
	Nan::ThrowError("Parameter mismatch");
}

void VtkLegendBoxActorWrap::SetNumberOfEntries(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkLegendBoxActorWrap *wrapper = ObjectWrap::Unwrap<VtkLegendBoxActorWrap>(info.Holder());
	vtkLegendBoxActor *native = (vtkLegendBoxActor *)wrapper->native.GetPointer();
	if(info.Length() > 0 && info[0]->IsInt32())
	{
				if(info.Length() != 1)
		{
			Nan::ThrowError("Too many parameters.");
			return;
		}
		native->SetNumberOfEntries(
			info[0]->Int32Value()
		);
		return;
	}
	Nan::ThrowError("Parameter mismatch");
}

void VtkLegendBoxActorWrap::SetPadding(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkLegendBoxActorWrap *wrapper = ObjectWrap::Unwrap<VtkLegendBoxActorWrap>(info.Holder());
	vtkLegendBoxActor *native = (vtkLegendBoxActor *)wrapper->native.GetPointer();
	if(info.Length() > 0 && info[0]->IsInt32())
	{
				if(info.Length() != 1)
		{
			Nan::ThrowError("Too many parameters.");
			return;
		}
		native->SetPadding(
			info[0]->Int32Value()
		);
		return;
	}
	Nan::ThrowError("Parameter mismatch");
}

void VtkLegendBoxActorWrap::SetScalarVisibility(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkLegendBoxActorWrap *wrapper = ObjectWrap::Unwrap<VtkLegendBoxActorWrap>(info.Holder());
	vtkLegendBoxActor *native = (vtkLegendBoxActor *)wrapper->native.GetPointer();
	if(info.Length() > 0 && info[0]->IsInt32())
	{
				if(info.Length() != 1)
		{
			Nan::ThrowError("Too many parameters.");
			return;
		}
		native->SetScalarVisibility(
			info[0]->Int32Value()
		);
		return;
	}
	Nan::ThrowError("Parameter mismatch");
}

void VtkLegendBoxActorWrap::SetUseBackground(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkLegendBoxActorWrap *wrapper = ObjectWrap::Unwrap<VtkLegendBoxActorWrap>(info.Holder());
	vtkLegendBoxActor *native = (vtkLegendBoxActor *)wrapper->native.GetPointer();
	if(info.Length() > 0 && info[0]->IsInt32())
	{
				if(info.Length() != 1)
		{
			Nan::ThrowError("Too many parameters.");
			return;
		}
		native->SetUseBackground(
			info[0]->Int32Value()
		);
		return;
	}
	Nan::ThrowError("Parameter mismatch");
}

void VtkLegendBoxActorWrap::ShallowCopy(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkLegendBoxActorWrap *wrapper = ObjectWrap::Unwrap<VtkLegendBoxActorWrap>(info.Holder());
	vtkLegendBoxActor *native = (vtkLegendBoxActor *)wrapper->native.GetPointer();
	if(info.Length() > 0 && info[0]->IsObject() && (Nan::New(VtkPropWrap::ptpl))->HasInstance(info[0]))
	{
		VtkPropWrap *a0 = ObjectWrap::Unwrap<VtkPropWrap>(info[0]->ToObject());
				if(info.Length() != 1)
		{
			Nan::ThrowError("Too many parameters.");
			return;
		}
		native->ShallowCopy(
			(vtkProp *) a0->native.GetPointer()
		);
		return;
	}
	Nan::ThrowError("Parameter mismatch");
}

void VtkLegendBoxActorWrap::UseBackgroundOff(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkLegendBoxActorWrap *wrapper = ObjectWrap::Unwrap<VtkLegendBoxActorWrap>(info.Holder());
	vtkLegendBoxActor *native = (vtkLegendBoxActor *)wrapper->native.GetPointer();
		if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	native->UseBackgroundOff();
}

void VtkLegendBoxActorWrap::UseBackgroundOn(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkLegendBoxActorWrap *wrapper = ObjectWrap::Unwrap<VtkLegendBoxActorWrap>(info.Holder());
	vtkLegendBoxActor *native = (vtkLegendBoxActor *)wrapper->native.GetPointer();
		if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	native->UseBackgroundOn();
}

