Package com.lightcrafts.mediax.jai

Examples of com.lightcrafts.mediax.jai.ImageFunction


        if (name.equalsIgnoreCase("complex")) {
            if(opNode instanceof RenderedOp) {
                RenderedOp op = (RenderedOp)opNode;
                ParameterBlock pb = op.getParameterBlock();
                ImageFunction imFunc = (ImageFunction)pb.getObjectParameter(0);
                return imFunc.isComplex() ? Boolean.TRUE : Boolean.FALSE;
            } else if(opNode instanceof RenderableOp) {
                RenderableOp op = (RenderableOp)opNode;
                ParameterBlock pb = op.getParameterBlock();
                ImageFunction imFunc = (ImageFunction)pb.getObjectParameter(0);
                return imFunc.isComplex() ? Boolean.TRUE : Boolean.FALSE;
            }
        }

        return java.awt.Image.UndefinedProperty;
    }
View Full Code Here


                                RenderingHints renderHints) {
        // Get ImageLayout from renderHints if any.
        ImageLayout layout = RIFUtil.getImageLayoutHint(renderHints);
       

        ImageFunction function =
            (ImageFunction)paramBlock.getObjectParameter(0);

        // Ascertain that a supplied SampleModel has the requisite
        // number of bands vis-a-vis the ImageFunction.
        int numBandsRequired = function.isComplex() ?
            function.getNumElements() * 2 : function.getNumElements();
        if(layout != null &&
           layout.isValid(ImageLayout.SAMPLE_MODEL_MASK) &&
           layout.getSampleModel(null).getNumBands() != numBandsRequired ) {
            throw new RuntimeException(JaiI18N.getString("ImageFunctionRIF0"));
        }
View Full Code Here

TOP

Related Classes of com.lightcrafts.mediax.jai.ImageFunction

Copyright © 2018 www.massapicom. 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.