Examples of CXFormWithAlpha


Examples of flash.swf.types.CXFormWithAlpha

    }


    private CXFormWithAlpha decodeCxforma() throws IOException
    {
        CXFormWithAlpha c = new CXFormWithAlpha();
        r.syncBits();
        c.hasAdd = r.readBit();
        c.hasMult = r.readBit();
        int nbits = r.readUBits(4);
        if (c.hasMult)
View Full Code Here

Examples of flash.swf.types.CXFormWithAlpha

        po3.setMatrix(matrix);

        if (context.colorTransform != null)
        {
            ColorTransformNode t = context.colorTransform;
            CXFormWithAlpha cx = TypeHelper.cxFormWithAlpha(t.alphaMultiplier, t.redMultiplier, t.greenMultiplier, t.blueMultiplier, t.alphaOffset, t.redOffset, t.greenOffset, t.blueOffset);
            po3.setCxform(cx);
        }

       
        if (context.maskType == MaskType.ALPHA)
View Full Code Here

Examples of flash.swf.types.CXFormWithAlpha

     *        in the range 0.0 to 1.0 (inclusive).
     * @return a SWF CXFormWithAlpha value for the specified alpha multiplier.
     */
    public static CXFormWithAlpha cxFormWithAlpha(double alphaMultiplier)
    {
        CXFormWithAlpha c = new CXFormWithAlpha();
        c.hasMult = true;
        c.alphaMultTerm = fixed8(alphaMultiplier);
        return c;
    }
View Full Code Here

Examples of flash.swf.types.CXFormWithAlpha

    public static CXFormWithAlpha cxFormWithAlpha(double alphaMultiplier,
            double redMultiplier, double greenMultiplier,
            double blueMultiplier, double alphaOffset, double redOffset,
            double greenOffset, double blueOffset)
    {
        CXFormWithAlpha c = new CXFormWithAlpha();
        c.alphaMultTerm = fixed8(alphaMultiplier);
        c.redMultTerm = fixed8(redMultiplier);
        c.greenMultTerm = fixed8(greenMultiplier);
        c.blueMultTerm = fixed8(blueMultiplier);
        c.alphaAddTerm = (int)(alphaOffset);
View Full Code Here

Examples of flash.swf.types.CXFormWithAlpha

    }


    private CXFormWithAlpha decodeCxforma() throws IOException
    {
        CXFormWithAlpha c = new CXFormWithAlpha();
        r.syncBits();
        c.hasAdd = r.readBit();
        c.hasMult = r.readBit();
        int nbits = r.readUBits(4);
        if (c.hasMult)
View Full Code Here

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

    }

    private CXFormWithAlpha readColorTransformWithAlpha()
    {
        bitStream.byteAlign();
        final CXFormWithAlpha cxFormWithAlpha = new CXFormWithAlpha();
        final boolean hasAddTerms = bitStream.readBit();
        final boolean hasMultTerms = bitStream.readBit();
        final int nbits = bitStream.readUB(4);

        if (hasMultTerms)
        {
            cxFormWithAlpha.setMultTerm(
                    bitStream.readSB(nbits),
                    bitStream.readSB(nbits),
                    bitStream.readSB(nbits),
                    bitStream.readSB(nbits));
        }

        if (hasAddTerms)
        {
            cxFormWithAlpha.setAddTerm(
                    bitStream.readSB(nbits),
                    bitStream.readSB(nbits),
                    bitStream.readSB(nbits),
                    bitStream.readSB(nbits));
        }
View Full Code Here

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

     *        in the range 0.0 to 1.0 (inclusive).
     * @return a SWF CXFormWithAlpha value for the specified alpha multiplier.
     */
    public static CXFormWithAlpha cxFormWithAlpha(double alphaMultiplier)
    {
        CXFormWithAlpha c = new CXFormWithAlpha();
        c.setMultTerm(fixed8(1.0), fixed8(1.0), fixed8(1.0), fixed8(alphaMultiplier));
        return c;
    }
View Full Code Here

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

    public static CXFormWithAlpha cxFormWithAlpha(double alphaMultiplier,
            double redMultiplier, double greenMultiplier,
            double blueMultiplier, double alphaOffset, double redOffset,
            double greenOffset, double blueOffset)
    {
        CXFormWithAlpha c = new CXFormWithAlpha();
        int alphaMultTerm = fixed8(alphaMultiplier);
        int redMultTerm = fixed8(redMultiplier);
        int greenMultTerm = fixed8(greenMultiplier);
        int blueMultTerm = fixed8(blueMultiplier);
        int alphaAddTerm = (int)(alphaOffset);
        int redAddTerm = (int)(redOffset);
        int greenAddTerm = (int)(greenOffset);
        int blueAddTerm = (int)(blueOffset);
       
        if (redAddTerm > 0 || greenAddTerm > 0 || blueAddTerm > 0 || alphaAddTerm > 0)
            c.setAddTerm(redAddTerm, greenAddTerm, blueAddTerm, alphaAddTerm);
        if (alphaMultTerm > 0 || redMultTerm > 0 || greenMultTerm > 0 || blueMultTerm > 0)
            c.setMultTerm(redMultTerm, greenMultTerm, blueMultTerm, alphaMultTerm);
       
        return c;
    }
View Full Code Here

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

        po3.setMatrix(matrix);
        po3.setHasMatrix(true);
        if (context.colorTransform != null)
        {
            ColorTransformNode t = context.colorTransform;
            CXFormWithAlpha cx = TypeHelper.cxFormWithAlpha(t.alphaMultiplier, t.redMultiplier, t.greenMultiplier, t.blueMultiplier, t.alphaOffset, t.redOffset, t.greenOffset, t.blueOffset);
            po3.setColorTransform(cx);
            po3.setHasColorTransform(true);
        }

       
View Full Code Here

Examples of tv.porst.swfretools.parser.structures.CxFormWithAlpha

    final Flag placeFlagHasFilterList = parseFlag(parser, 0x00006, "PlaceObject3::PlaceFlagHasFilterList");
    final UINT16 depth = parseUINT16(parser, 0x00005, "PlaceObject3::Depth");
    final AsciiString className = parseStringIf(parser, 0x00006, placeFlagHasClassName.value() || (placeFlagHasImage.value() && placeFlagHasCharacter.value()), "PlaceObject3::ClassName");
    final UINT16 characterId = parseUINT16If(parser, 0x00006, placeFlagHasCharacter, "PlaceObject3::CharacterId");
    final Matrix matrix = MatrixParser.parseIf(parser, placeFlagHasMatrix, "PlaceObject3::Matrix");
    final CxFormWithAlpha colorTransform = CxFormWithAlphaParser.parseIf(parser, placeFlagHasColorTransform, "PlaceObject3::CxFormWithAlpha");
    final UINT16 ratio = parseUINT16If(parser, 0x00006, placeFlagHasRatio, "PlaceObject3::Ratio");
    final AsciiString name = parseStringIf(parser, 0x00006, placeFlagHasName, "PlaceObject3::Name");
    final UINT16 clipDepth = parseUINT16If(parser, 0x00006, placeFlagHasClipDepth, "PlaceObject3::ClipDepth");
    final FilterList surfaceFilterList = FilterListParser.parseIf(parser, placeFlagHasFilterList, "PlaceObject3::SurfaceFilterList");
    final UINT8 blendMode = parseUINT8If(parser, 0x00006, placeFlagHasBlendMode, "PlaceObject3::BlendMode");
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.