Examples of CXForm


Examples of flash.swf.types.CXForm

        return t;
    }

    private CXForm decodeCxform() throws IOException
    {
        CXForm c = new CXForm();
        r.syncBits();

        c.hasAdd = r.readBit();
        c.hasMult = r.readBit();
        int nbits = r.readUBits(4);
View Full Code Here

Examples of flash.swf.types.CXForm

    {
        // todo add error checking
        //    must be six parts
        //    each term must be -32768..32767
        String[] parts = StringUtils.split(s, "([rgb]\\+?| )");
        CXForm cxform = new CXForm();
        cxform.redAddTerm = Integer.parseInt(parts[0]);
        cxform.redMultTerm = Integer.parseInt(parts[1]);
        cxform.greenAddTerm = Integer.parseInt(parts[2]);
        cxform.greenMultTerm = Integer.parseInt(parts[3]);
        cxform.blueAddTerm = Integer.parseInt(parts[4]);
View Full Code Here

Examples of flash.swf.types.CXForm

        return t;
    }

    private CXForm decodeCxform() throws IOException
    {
        CXForm c = new CXForm();
        r.syncBits();

        c.hasAdd = r.readBit();
        c.hasMult = r.readBit();
        int nbits = r.readUBits(4);
View Full Code Here

Examples of flash.swf.types.CXForm

    {
        // todo add error checking
        //    must be six parts
        //    each term must be -32768..32767
        String[] parts = StringUtils.split(s, "([rgb]\\+?| )");
        CXForm cxform = new CXForm();
        cxform.redAddTerm = Integer.parseInt(parts[0]);
        cxform.redMultTerm = Integer.parseInt(parts[1]);
        cxform.greenAddTerm = Integer.parseInt(parts[2]);
        cxform.greenMultTerm = Integer.parseInt(parts[3]);
        cxform.blueAddTerm = Integer.parseInt(parts[4]);
View Full Code Here

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

    }

    private CXForm readColorTransform()
    {
        bitStream.byteAlign();
        final CXForm cx = new CXForm();
        final boolean hasAddTerms = bitStream.readBit();
        final boolean hasMultTerms = bitStream.readBit();
        final int nbits = bitStream.readUB(4);

        if (hasAddTerms)
        {
            cx.setAddTerm(
                    bitStream.readSB(nbits),
                    bitStream.readSB(nbits),
                    bitStream.readSB(nbits));
        }

        if (hasMultTerms)
        {
            cx.setMultTerm(
                    bitStream.readSB(nbits),
                    bitStream.readSB(nbits),
                    bitStream.readSB(nbits));
        }
View Full Code Here

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

    private void writePlaceObject(PlaceObjectTag tag)
    {
        tagBuffer.writeUI16(tag.getCharacter().getCharacterID());
        tagBuffer.writeUI16(tag.getDepth());
        writeMatrix(tag.getMatrix());
        final CXForm colorTransform = tag.getColorTransform();
        if (colorTransform != null)
            writeColorTransform(colorTransform);
    }
View Full Code Here

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

   * @throws SWFParserException Thrown if parsing the tag failed.
   */
  public static Tag parse(final RecordHeader header, final SWFBinaryParser parser) throws SWFParserException {

    final UINT16 buttonId = parseUINT16(parser, 0x00006, "DefineButtonCxform::ButtonId");
    final CxForm buttonColorTransform = CxFormParser.parse(parser, "DefineButtonCxform::ButtonColorTransform");

    return new DefineButtonCxformTag(header, buttonId, buttonColorTransform);
  }
View Full Code Here

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

  public static PlaceObjectTag parse(final SWFBinaryParser parser, final RecordHeader header) throws SWFParserException {

    final UINT16 characterId = parseUINT16(parser, 0x00006, "PlaceObject::CharacterId");
    final UINT16 depth = parseUINT16(parser, 0x00006, "PlaceObject::Depth");
    final Matrix matrix = MatrixParser.parse(parser, "PlaceObject::Matrix");
    final CxForm colorTransform = CxFormParser.parse(parser, "PlaceObject::CxForm");

    return new PlaceObjectTag(header, characterId, depth, matrix, colorTransform);
  }
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.