00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef _FLASH_GEOM_H
00021 #define _FLASH_GEOM_H
00022
00023 #include "compat.h"
00024 #include "asobject.h"
00025
00026 namespace lightspark
00027 {
00028
00029 class Rectangle: public ASObject
00030 {
00031 public:
00032 Rectangle():x(0),y(0),width(0),height(0){}
00033 number_t x,y,width,height;
00034 static void sinit(Class_base* c);
00035 static void buildTraits(ASObject* o);
00036 tiny_string toString(bool debugMsg=false);
00037 ASFUNCTION(_constructor);
00038 ASFUNCTION(_getLeft);
00039 ASFUNCTION(_setLeft);
00040 ASFUNCTION(_getRight);
00041 ASFUNCTION(_setRight);
00042 ASFUNCTION(_getWidth);
00043 ASFUNCTION(_setWidth);
00044 ASFUNCTION(_getTop);
00045 ASFUNCTION(_setTop);
00046 ASFUNCTION(_getBottom);
00047 ASFUNCTION(_setBottom);
00048 ASFUNCTION(_getHeight);
00049 ASFUNCTION(_setHeight);
00050 ASFUNCTION(clone);
00051 const RECT getRect() const;
00052 };
00053
00054 class Point: public ASObject
00055 {
00056 private:
00057 number_t x,y;
00058 public:
00059 Point(number_t _x = 0, number_t _y = 0):x(_x),y(_y){}
00060 static void sinit(Class_base* c);
00061 static void buildTraits(ASObject* o);
00062 tiny_string toString(bool debugMsg=false);
00063 ASFUNCTION(_constructor);
00064 ASFUNCTION(_getX);
00065 ASFUNCTION(_getY);
00066 ASFUNCTION(_setX);
00067 ASFUNCTION(_setY);
00068 ASFUNCTION(_getlength);
00069 ASFUNCTION(interpolate);
00070 ASFUNCTION(distance);
00071 ASFUNCTION(add);
00072 ASFUNCTION(subtract);
00073 ASFUNCTION(clone);
00074 ASFUNCTION(equals);
00075 ASFUNCTION(normalize);
00076 ASFUNCTION(offset);
00077 ASFUNCTION(polar);
00078
00079 number_t len() const;
00080 };
00081
00082 class ColorTransform: public ASObject
00083 {
00084 private:
00085 number_t redMultiplier,greenMultiplier,blueMultiplier,alphaMultiplier;
00086 number_t redOffset,greenOffset,blueOffset,alphaOffset;
00087 public:
00088 static void sinit(Class_base* c);
00089 ASFUNCTION(_constructor);
00090 ASFUNCTION(setColor);
00091 ASFUNCTION(getColor);
00092 };
00093
00094 class Transform: public ASObject
00095 {
00096 public:
00097 static void sinit(Class_base* c);
00098 static void buildTraits(ASObject* o);
00099 };
00100
00101
00102 class Matrix: public ASObject
00103 {
00104 number_t a, b, c, d, tx, ty;
00105 public:
00106 static void sinit(Class_base* c);
00107 static void buildTraits(ASObject* o);
00108
00109
00110 tiny_string toString(bool debugMsg=false);
00111
00112 ASFUNCTION(_constructor);
00113
00114
00115 ASFUNCTION(identity);
00116 ASFUNCTION(rotate);
00117 ASFUNCTION(scale);
00118 ASFUNCTION(translate);
00119
00120
00121 ASFUNCTION(_get_a);
00122 ASFUNCTION(_get_b);
00123 ASFUNCTION(_get_c);
00124 ASFUNCTION(_get_d);
00125 ASFUNCTION(_get_tx);
00126 ASFUNCTION(_get_ty);
00127 ASFUNCTION(_set_a);
00128 ASFUNCTION(_set_b);
00129 ASFUNCTION(_set_c);
00130 ASFUNCTION(_set_d);
00131 ASFUNCTION(_set_tx);
00132 ASFUNCTION(_set_ty);
00133 };
00134
00135 };
00136 #endif