Package com.volantis.mcs.policies.variants.image

Examples of com.volantis.mcs.policies.variants.image.GenericImageSelection


                final String assetGroup = "assetgroup";
                Variant variant = factory.createGenericImageVariant(
                        temporaryFile, assetGroup, 50).getVariant();

                // Test selection.
                GenericImageSelection selection = (GenericImageSelection)
                        variant.getSelection();
                assertEquals("", 50, selection.getWidthHint());

                // Test meta data.
                checkMetaData(variant, 36, 36, 8, ImageRendering.COLOR,
                        ImageEncoding.GIF);
View Full Code Here


        // the remaining variants.
        for (Iterator i = images.iterator(); i.hasNext();) {
            Variant variant = (Variant) i.next();
            ImageMetaData image = (ImageMetaData) variant.getMetaData();

            GenericImageSelection generic = (GenericImageSelection)
                    variant.getSelection();

            int widthHint = generic.getWidthHint();
            int currentWidth = image.getWidth();
            if (widthHint != 0) {
                int allowedWidth = (widthHint * deviceWidth) / 100;
                if (currentWidth > allowedWidth) {
                    if (logger.isDebugEnabled()) {
View Full Code Here

TOP

Related Classes of com.volantis.mcs.policies.variants.image.GenericImageSelection

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.