00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #pragma once
00024
00025 #include <string>
00026 #include <v8.h>
00027
00028 #include "CanvasContext.h"
00029 #include "CanvasLogger.h"
00030 #include "CanvasV8Context.h"
00031
00032
00033 std::string toString(v8::Local<v8::Value> value);
00034 Ogre::Canvas::Logger* getCanvasLoggerPointer(const v8::Arguments& args);
00035 Ogre::Canvas::Gradient* getGradientPointer(const v8::Arguments& args);
00036 Ogre::Canvas::Context* getCanvasContextPointer(const v8::Arguments& args);
00037 Ogre::Canvas::Context* getCanvasContextPointer(const v8::AccessorInfo& info);
00038 Ogre::Canvas::V8Context* getV8CanvasContext(const v8::Arguments& args);
00039
00040 Ogre::ColourValue getColor(v8::Local<v8::Value> value);
00041 Ogre::Canvas::Gradient* getGradient(v8::Local<v8::Value> value);
00042 Ogre::Canvas::Pattern* getPattern(v8::Local<v8::Value> value);
00043 Ogre::Image* getImage(v8::Local<v8::Value> value);
00044
00045
00046 v8::Handle<v8::Value> log(const v8::Arguments& args);
00047
00048
00049 v8::Handle<v8::Value> loadImage(const v8::Arguments& args);
00050
00051
00052 v8::Handle<v8::Value> addColorStop(const v8::Arguments& args);
00053 v8::Handle<v8::Value> gradient_destroy(const v8::Arguments& args);
00054
00055
00056 v8::Handle<v8::Value> save(const v8::Arguments& args);
00057 v8::Handle<v8::Value> restore(const v8::Arguments& args);
00058
00059
00060 v8::Handle<v8::Value> scale(const v8::Arguments& args);
00061 v8::Handle<v8::Value> rotate(const v8::Arguments& args);
00062 v8::Handle<v8::Value> translate(const v8::Arguments& args);
00063 v8::Handle<v8::Value> transform(const v8::Arguments& args);
00064 v8::Handle<v8::Value> setTransform(const v8::Arguments& args);
00065
00066
00067 v8::Handle<v8::Value> drawImage(const v8::Arguments& args);
00068
00069
00070 v8::Handle<v8::Value> getterGlobalAlpha(v8::Local<v8::String> property, const v8::AccessorInfo& info);
00071 void setterGlobalAlpha(v8::Local<v8::String> property, v8::Local<v8::Value> value, const v8::AccessorInfo& info);
00072
00073 v8::Handle<v8::Value> getterGlobalCompositeOperation(v8::Local<v8::String> property, const v8::AccessorInfo& info);
00074 void setterGlobalCompositeOperation(v8::Local<v8::String> property, v8::Local<v8::Value> value, const v8::AccessorInfo& info);
00075
00076
00077 v8::Handle<v8::Value> getterLineWidth(v8::Local<v8::String> property, const v8::AccessorInfo& info);
00078 void setterLineWidth(v8::Local<v8::String> property, v8::Local<v8::Value> value, const v8::AccessorInfo& info);
00079
00080 v8::Handle<v8::Value> getterLineCap(v8::Local<v8::String> property, const v8::AccessorInfo& info);
00081 void setterLineCap(v8::Local<v8::String> property, v8::Local<v8::Value> value, const v8::AccessorInfo& info);
00082
00083 v8::Handle<v8::Value> getterLineJoin(v8::Local<v8::String> property, const v8::AccessorInfo& info);
00084 void setterLineJoin(v8::Local<v8::String> property, v8::Local<v8::Value> value, const v8::AccessorInfo& info);
00085
00086 v8::Handle<v8::Value> getterMiterLimit(v8::Local<v8::String> property, const v8::AccessorInfo& info);
00087 void setterMiterLimit(v8::Local<v8::String> property, v8::Local<v8::Value> value, const v8::AccessorInfo& info);
00088
00089 v8::Handle<v8::Value> getterLineDash(v8::Local<v8::String> property, const v8::AccessorInfo& info);
00090 void setterLineDash(v8::Local<v8::String> property, v8::Local<v8::Value> value, const v8::AccessorInfo& info);
00091
00092
00093 v8::Handle<v8::Value> getterStrokeStyle(v8::Local<v8::String> property, const v8::AccessorInfo& info);
00094 void setterStrokeStyle(v8::Local<v8::String> property, v8::Local<v8::Value> value, const v8::AccessorInfo& info);
00095
00096 v8::Handle<v8::Value> getterFillStyle(v8::Local<v8::String> property, const v8::AccessorInfo& info);
00097 void setterFillStyle(v8::Local<v8::String> property, v8::Local<v8::Value> value, const v8::AccessorInfo& info);
00098
00099 v8::Handle<v8::Value> getterShadowOffsetX(v8::Local<v8::String> property, const v8::AccessorInfo& info);
00100 void setterShadowOffsetX(v8::Local<v8::String> property, v8::Local<v8::Value> value, const v8::AccessorInfo& info);
00101
00102 v8::Handle<v8::Value> getterShadowOffsetY(v8::Local<v8::String> property, const v8::AccessorInfo& info);
00103 void setterShadowOffsetY(v8::Local<v8::String> property, v8::Local<v8::Value> value, const v8::AccessorInfo& info);
00104
00105 v8::Handle<v8::Value> getterShadowBlur(v8::Local<v8::String> property, const v8::AccessorInfo& info);
00106 void setterShadowBlur(v8::Local<v8::String> property, v8::Local<v8::Value> value, const v8::AccessorInfo& info);
00107
00108 v8::Handle<v8::Value> getterShadowColor(v8::Local<v8::String> property, const v8::AccessorInfo& info);
00109 void setterShadowColor(v8::Local<v8::String> property, v8::Local<v8::Value> value, const v8::AccessorInfo& info);
00110
00111 v8::Handle<v8::Value> createLinearGradient(const v8::Arguments& args);
00112 v8::Handle<v8::Value> createRadialGradient(const v8::Arguments& args);
00113 v8::Handle<v8::Value> createPattern(const v8::Arguments& args);
00114
00115
00116 v8::Handle<v8::Value> beginPath(const v8::Arguments& args);
00117 v8::Handle<v8::Value> closePath(const v8::Arguments& args);
00118 v8::Handle<v8::Value> fill(const v8::Arguments& args);
00119 v8::Handle<v8::Value> stroke(const v8::Arguments& args);
00120 v8::Handle<v8::Value> clip(const v8::Arguments& args);
00121
00122 v8::Handle<v8::Value> moveTo(const v8::Arguments& args);
00123 v8::Handle<v8::Value> lineTo(const v8::Arguments& args);
00124 v8::Handle<v8::Value> quadraticCurveTo(const v8::Arguments& args);
00125 v8::Handle<v8::Value> bezierCurveTo(const v8::Arguments& args);
00126 v8::Handle<v8::Value> arcTo(const v8::Arguments& args);
00127 v8::Handle<v8::Value> arc(const v8::Arguments& args);
00128 v8::Handle<v8::Value> rect(const v8::Arguments& args);
00129 v8::Handle<v8::Value> isPointInPath(const v8::Arguments& args);
00130
00131
00132 v8::Handle<v8::Value> getterFont(v8::Local<v8::String> property, const v8::AccessorInfo& info);
00133 void setterFont(v8::Local<v8::String> property, v8::Local<v8::Value> value, const v8::AccessorInfo& info);
00134
00135 v8::Handle<v8::Value> getterTextAlign(v8::Local<v8::String> property, const v8::AccessorInfo& info);
00136 void setterTextAlign(v8::Local<v8::String> property, v8::Local<v8::Value> value, const v8::AccessorInfo& info);
00137
00138 v8::Handle<v8::Value> getterTextBaseline(v8::Local<v8::String> property, const v8::AccessorInfo& info);
00139 void setterTextBaseline(v8::Local<v8::String> property, v8::Local<v8::Value> value, const v8::AccessorInfo& info);
00140
00141 v8::Handle<v8::Value> fillText(const v8::Arguments& args);
00142 v8::Handle<v8::Value> strokeText(const v8::Arguments& args);
00143 v8::Handle<v8::Value> measureText(const v8::Arguments& args);
00144
00145
00146 v8::Handle<v8::Value> clearRect(const v8::Arguments& args);
00147 v8::Handle<v8::Value> fillRect(const v8::Arguments& args);
00148 v8::Handle<v8::Value> strokeRect(const v8::Arguments& args);
00149
00150
00151 v8::Handle<v8::Value> getterAntiAliasing(v8::Local<v8::String> property, const v8::AccessorInfo& info);
00152 void setterAntiAliasing(v8::Local<v8::String> property, v8::Local<v8::Value> value, const v8::AccessorInfo& info);
00153
00154 v8::Handle<v8::Value> saveToFile(const v8::Arguments& args);