Package org.apache.flex.swf.types

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


     * @throws RuntimeExpection if the record is invalid.
     */
    private GradRecord readGradRecord(TagType tagType)
    {
        final int ratio = bitStream.readUI8();
        RGB color = null;
        if (TagType.DefineShape == tagType || TagType.DefineShape2 == tagType)
        {
            color = readRGB();
        }
        else if (TagType.DefineShape3 == tagType || TagType.DefineShape4 == tagType)
View Full Code Here


        return rect;
    }

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

        if (metadata != null)
            writeTag(new MetadataTag(metadata));

        // SetBackgroundColor tag
        final RGB backgroundColor = swf.getBackgroundColor();
        if (backgroundColor != null)
            writeTag(new SetBackgroundColorTag(backgroundColor));

        // EnableDebugger2 tag       
        if (enableDebug)
View Full Code Here

    /**
     * Create a {@code SetBackgroundColor} tag from RGB component values.
     */
    public SetBackgroundColorTag(short red, short green, short blue)
    {
        this(new RGB(red, green, blue));
    }
View Full Code Here

            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

            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

        fr.xMin = r.xMin();
        fr.yMin = r.yMin();
        fr.xMax = r.xMax();
        fr.yMax = r.yMax();
        movie.size = fr;
        RGB bg = swf.getBackgroundColor();
        int red = bg.getRed();
        red = red << 16;
        int green = bg.getGreen();
        green = green << 8;
        int blue = bg.getBlue();
        movie.bgcolor = new SetBackgroundColor(red + green + blue);
        movie.topLevelClass = swf.getTopLevelClass();
       
    }
View Full Code Here

        Boolean attrUseGPU = targetAttributes.getUseGPU();
        if (attrUseGPU != null)
            swfUseGPU = attrUseGPU.booleanValue();

       
        final RGB swfBackgroundColorRGB = getBackgroundColor();

        SWF swf = new SWF();
        swf.setVersion(swfVersion);
        swf.setFrameSize(swfFrameSize);
        swf.setFrameRate(swfFrameRate);
View Full Code Here

            if (project instanceof FlexProject)
                swfBackgroundColorInt = ((FlexProject)project).getColorAsInt(attrBackgroundColorString);
            else
                swfBackgroundColorInt = Integer.decode(attrBackgroundColorString).intValue();
        }
        swfBackgroundColor = new RGB(swfBackgroundColorInt);
        return swfBackgroundColor;
    }
View Full Code Here

        fr.xMin = r.xMin();
        fr.yMin = r.yMin();
        fr.xMax = r.xMax();
        fr.yMax = r.yMax();
        movie.size = fr;
        RGB bg = swf.getBackgroundColor();
        int red = bg.getRed();
        red = red << 16;
        int green = bg.getGreen();
        green = green << 8;
        int blue = bg.getBlue();
        movie.bgcolor = new SetBackgroundColor(red + green + blue);
        movie.topLevelClass = swf.getTopLevelClass();
       
    }
View Full Code Here

TOP

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

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.