Package caltrop.interpreter.environment

Examples of caltrop.interpreter.environment.HashEnvironment.bind()


        //        function RGBCLIP( a: INT19 ) return UINT8;
        env.bind("UINT9_zero", _theContext.createInteger(0));
        env.bind("YSCALE", _theContext.createInteger((int) (1.164 * 256)));
        env.bind("RSCALE", _theContext.createInteger((int) (1.596 * 256)));
        env.bind("GUSCALE", _theContext.createInteger((int) (-0.392 * 256)));
        env.bind("GVSCALE", _theContext.createInteger((int) (-0.813 * 256)));
        env.bind("BSCALE", _theContext.createInteger((int) (2.017 * 256)));

        env.bind("YOFFSET", _theContext.createInteger(16));
        env.bind("UVOFFSET", _theContext.createInteger(128));

View Full Code Here


        env.bind("UINT9_zero", _theContext.createInteger(0));
        env.bind("YSCALE", _theContext.createInteger((int) (1.164 * 256)));
        env.bind("RSCALE", _theContext.createInteger((int) (1.596 * 256)));
        env.bind("GUSCALE", _theContext.createInteger((int) (-0.392 * 256)));
        env.bind("GVSCALE", _theContext.createInteger((int) (-0.813 * 256)));
        env.bind("BSCALE", _theContext.createInteger((int) (2.017 * 256)));

        env.bind("YOFFSET", _theContext.createInteger(16));
        env.bind("UVOFFSET", _theContext.createInteger(128));

        env.bind("INT19_mul", _theContext.createFunction(new Function() {
View Full Code Here

        env.bind("RSCALE", _theContext.createInteger((int) (1.596 * 256)));
        env.bind("GUSCALE", _theContext.createInteger((int) (-0.392 * 256)));
        env.bind("GVSCALE", _theContext.createInteger((int) (-0.813 * 256)));
        env.bind("BSCALE", _theContext.createInteger((int) (2.017 * 256)));

        env.bind("YOFFSET", _theContext.createInteger(16));
        env.bind("UVOFFSET", _theContext.createInteger(128));

        env.bind("INT19_mul", _theContext.createFunction(new Function() {
            public Object apply(Object[] args) {
                try {
View Full Code Here

        env.bind("GUSCALE", _theContext.createInteger((int) (-0.392 * 256)));
        env.bind("GVSCALE", _theContext.createInteger((int) (-0.813 * 256)));
        env.bind("BSCALE", _theContext.createInteger((int) (2.017 * 256)));

        env.bind("YOFFSET", _theContext.createInteger(16));
        env.bind("UVOFFSET", _theContext.createInteger(128));

        env.bind("INT19_mul", _theContext.createFunction(new Function() {
            public Object apply(Object[] args) {
                try {
                    IntToken a = (IntToken) args[0];
View Full Code Here

        env.bind("BSCALE", _theContext.createInteger((int) (2.017 * 256)));

        env.bind("YOFFSET", _theContext.createInteger(16));
        env.bind("UVOFFSET", _theContext.createInteger(128));

        env.bind("INT19_mul", _theContext.createFunction(new Function() {
            public Object apply(Object[] args) {
                try {
                    IntToken a = (IntToken) args[0];
                    IntToken b = (IntToken) args[1];
                    int res = (a.intValue() * b.intValue()); // & 0x7ffff;
View Full Code Here

            public int arity() {
                return 2;
            }
        }));

        env.bind("RGBCLIP", _theContext.createFunction(new Function() {
            public Object apply(Object[] args) {
                try {
                    Token a = (Token) args[0];

                    if (a instanceof IntToken) {
View Full Code Here

            public int arity() {
                return 1;
            }
        }));

        env.bind("readByte", _theContext.createFunction(new Function() {
            public Object apply(Object[] args) {
                try {
                    Token a = (Token) args[0];

                    if (a instanceof ObjectToken) {
View Full Code Here

            public int arity() {
                return 1;
            }
        }));

        env.bind("openFile", _theContext.createFunction(new Function() {
            public Object apply(Object[] args) {
                try {
                    Token a = (Token) args[0];

                    if (a instanceof StringToken) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.