Package org.apache.flex.swf.types

Examples of org.apache.flex.swf.types.RGBA


            {
                IFillStyle fillStyle = readFillStyle(tagType);
                s.setFillType((FillStyle)fillStyle);
                // Default to #00000000 when there's no color,
                // to match behavior of old SWF reader
                s.setColor(new RGBA(0, 0, 0, 0));
            }
            else
            {
                s.setColor(readRGBA());
            }
View Full Code Here


                bitStream.readUI8());
    }

    private RGBA readRGBA()
    {
        return new RGBA(
                bitStream.readUI8(),
                bitStream.readUI8(),
                bitStream.readUI8(),
                bitStream.readUI8());
    }
View Full Code Here

     * @see SWFWriter#writeMorphGradRecord
     */
    private MorphGradRecord readMorphGradRecord()
    {
        final int startRatio = bitStream.readUI8();
        final RGBA startColor = readRGBA();
        final int endRatio = bitStream.readUI8();
        final RGBA endColor = readRGBA();

        final MorphGradRecord result = new MorphGradRecord();
        result.setStartRatio(startRatio);
        result.setStartColor(startColor);
        result.setEndRatio(endRatio);
View Full Code Here

        final int fillStyleType = bitStream.readUI8();
        result.setFillStyleType(fillStyleType);
        switch (fillStyleType)
        {
            case FillStyle.SOLID_FILL:
                final RGBA startColor = readRGBA();
                final RGBA endColor = readRGBA();
                result.setStartColor(startColor);
                result.setEndColor(endColor);
                break;
            case FillStyle.LINEAR_GRADIENT_FILL:
            case FillStyle.RADIAL_GRADIENT_FILL:
View Full Code Here

     */
    private MorphLineStyle readMorphLineStyle()
    {
        final int startWidth = bitStream.readUI16();
        final int endWidth = bitStream.readUI16();
        final RGBA startColor = readRGBA();
        final RGBA endColor = readRGBA();

        final MorphLineStyle result = new MorphLineStyle();
        result.setStartWidth(startWidth);
        result.setEndWidth(endWidth);
        result.setStartColor(startColor);
View Full Code Here

        int argb = rgb | (a << 24);
        return argb;
    }
   
    public static RGBA splitColor(int alphacolor) {
        return new RGBA((alphacolor & 0xFF0000) >> 16, (alphacolor & 0xFF00) >> 8, alphacolor & 0xFF, (alphacolor & 0xFF000000) >> 24);
    }
View Full Code Here

        GradientBevelFilter filter = new GradientBevelFilter();
        if (node.entries != null)
        {
            byte count = (byte)node.entries.size();
            filter.setNumColors(count);
            RGBA gradientColors[] = new RGBA[count];
            int gradientRatios[] = new int[count];
            filter.setGradientColors(gradientColors);
            filter.setGradientRatio(gradientRatios);

            GradRecord[] records = createGradRecords(node.entries);
            for (int i = 0; i < records.length; i++)
            {
                GradRecord record = records[i];
                RGB color = record.getColor();
                if (color instanceof RGBA)
                    gradientColors[i] = (RGBA)color;
                else
                    gradientColors[i] = new RGBA(color.getRed(), color.getGreen(), color.getBlue(), 0xFF);
                gradientRatios[i] = record.getRatio();
            }
        }

        filter.setAngle((float)(node.angle*Math.PI/180.0));
 
View Full Code Here

        if (node.entries != null)
        {
            byte count = (byte)node.entries.size();
            filter.setNumColors(count);
            RGBA gradientColors[] = new RGBA[count];
            int gradientRatio[] = new int[count];

            GradRecord[] records = createGradRecords(node.entries);
            for (int i = 0; i < records.length; i++)
            {
                GradRecord record = records[i];
                RGB color = record.getColor();
                if (color instanceof RGBA)
                    gradientColors[i] = (RGBA)color;
                else
                    gradientColors[i] = new RGBA(color.getRed(), color.getGreen(), color.getBlue(), 0xFF);
                gradientRatio[i] = record.getRatio();
            }
            filter.setGradientColors(gradientColors);
            filter.setGradientRatio(gradientRatio);
        }
View Full Code Here

TOP

Related Classes of org.apache.flex.swf.types.RGBA

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.