Package tv.porst.splib.binaryparser

Examples of tv.porst.splib.binaryparser.Bits


    }

    final Flag hasAddTerms = parseFlag(parser, 0x00006, fieldName + "::HasAddTerms");
    final Flag hasMultTerms = parseFlag(parser, 0x00006, fieldName + "::HasMultTerms");
    final UBits nBits = parseUBits(parser, 4, 0x00006, fieldName + "::NBits");
    final Bits redMultTerm = parseSBitsIf(parser, nBits.value(), 0x00006, hasMultTerms.value(), fieldName + "::RedMultTerm");
    final Bits greenMultTerm = parseSBitsIf(parser, nBits.value(), 0x00006, hasMultTerms.value(), fieldName + "::GreenMultTerm");
    final Bits blueMultTerm = parseSBitsIf(parser, nBits.value(), 0x00006, hasMultTerms.value(), fieldName + "::BlueMultTerm");
    final Bits alphaMultTerm = parseSBitsIf(parser, nBits.value(), 0x00006, hasMultTerms.value(), fieldName + "::BlueMultTerm");
    final Bits redAddTerm = parseSBitsIf(parser, nBits.value(), 0x00006, hasAddTerms.value(), fieldName + "::RedAddTerm");
    final Bits greenAddTerm = parseSBitsIf(parser, nBits.value(), 0x00006, hasAddTerms.value(), fieldName + "::GreenAddTerm");
    final Bits blueAddTerm = parseSBitsIf(parser, nBits.value(), 0x00006, hasAddTerms.value(), fieldName + "::BlueAddTerm");
    final Bits alphaAddTerm = parseSBitsIf(parser, nBits.value(), 0x00006, hasAddTerms.value(), fieldName + "::BlueAddTerm");

    parser.align();

    return new CxFormWithAlpha(hasAddTerms, hasMultTerms, nBits, redMultTerm, greenMultTerm, blueMultTerm, alphaMultTerm, redAddTerm, greenAddTerm, blueAddTerm, alphaAddTerm);
  }
View Full Code Here


    if (nBits.value() == 0) {
      parser.align();
      return new Rect(nBits, null, null, null, null);
    }

    final Bits xMin = parseSBits(parser, nBits.value(), 0x00006, fieldName + "::XMin");
    final Bits xMax = parseSBits(parser, nBits.value(), 0x00006, fieldName + "::XMax");
    final Bits yMin = parseSBits(parser, nBits.value(), 0x00006, fieldName + "::YMin");
    final Bits yMax = parseSBits(parser, nBits.value(), 0x00006, fieldName + "::YMax");

    parser.align();

    return new Rect(nBits, xMin, xMax, yMin, yMax);
  }
View Full Code Here

   *
   * @throws SWFParserException Thrown if the structure could not be parsed.
   */
  public static GlyphEntry parse(final SWFBinaryParser parser, final int glyphBits, final int advanceBits, final String fieldName) throws SWFParserException {
    final UBits glyphIndex = parseUBits(parser, glyphBits, 0x00006, fieldName + "::GlyphIndex");
    final Bits advanceIndex = parseSBits(parser, advanceBits, 0x00006, fieldName + "::AdvanceIndex");

    return new GlyphEntry(glyphIndex, advanceIndex);
  }
View Full Code Here

    }

    final Flag hasAddTerms = parseFlag(parser, 0x00006, fieldName + "::HasAddTerms");
    final Flag hasMultTerms = parseFlag(parser, 0x00006, fieldName + "::HasMultTerms");
    final UBits nBits = parseUBits(parser, 4, 0x00006, fieldName + "::NBits");
    final Bits redMultTerm = parseSBitsIf(parser, nBits.value(), 0x00006, hasMultTerms.value(), fieldName + "::RedMultTerm");
    final Bits greenMultTerm = parseSBitsIf(parser, nBits.value(), 0x00006, hasMultTerms.value(), fieldName + "::GreenMultTerm");
    final Bits blueMultTerm = parseSBitsIf(parser, nBits.value(), 0x00006, hasMultTerms.value(), fieldName + "::BlueMultTerm");
    final Bits redAddTerm = parseSBitsIf(parser, nBits.value(), 0x00006, hasAddTerms.value(), fieldName + "::RedAddTerm");
    final Bits greenAddTerm = parseSBitsIf(parser, nBits.value(), 0x00006, hasAddTerms.value(), fieldName + "::GreenAddTerm");
    final Bits blueAddTerm = parseSBitsIf(parser, nBits.value(), 0x00006, hasAddTerms.value(), fieldName + "::BlueAddTerm");

    parser.align();

    return new CxForm(hasAddTerms, hasMultTerms, nBits, redMultTerm, greenMultTerm, blueMultTerm, redAddTerm, greenAddTerm, blueAddTerm);
  }
View Full Code Here

    final Flag typeFlag = parseFlag(parser, 0x00006, fieldName + "::TypeFlag");
    final Flag straightFlag = parseFlag(parser, 0x00006, fieldName + "::StraightFlag");
    final UBits numBits = parseUBits(parser, 4, 0x00006, fieldName + "::NumBits");
    final Flag generalLineFlag = parseFlag(parser, 0x00006, fieldName + "::GeneralLineFlag");
    final Flag vertLineFlag =  parseFlagIf(parser, 0x00006, !generalLineFlag.value(), fieldName + "::VertLineFlag");
    final Bits deltaX = parseSBitsIf(parser, numBits.value() + 2, 0x00006, generalLineFlag.value() || !vertLineFlag.value(), fieldName + "::DeltaX");
    final Bits deltaY = parseSBitsIf(parser, numBits.value() + 2, 0x00006, generalLineFlag.value() || vertLineFlag.value(), fieldName + "::DeltaY");

    return new StraightEdgeRecord(typeFlag, straightFlag, numBits, generalLineFlag, vertLineFlag, deltaX, deltaY);
  }
View Full Code Here

  public static CurvedEdgeRecord parse(final SWFBinaryParser parser, final String fieldName) throws SWFParserException {

    final Flag typeFlag = parseFlag(parser, 0x00006, fieldName + "::TypeFlag");
    final Flag straightFlag = parseFlag(parser, 0x00006, fieldName + "::StraightFlag");
    final UBits numBits = parseUBits(parser, 4, 0x00006, fieldName + "::NumBits");
    final Bits controlDeltaX = parseSBits(parser, numBits.value() + 2, 0x00006, fieldName + "::ControlDeltaX");
    final Bits controlDeltaY = parseSBits(parser, numBits.value() + 2, 0x00006, fieldName + "::ControlDeltaY");
    final Bits anchorDeltaX = parseSBits(parser, numBits.value() + 2, 0x00006, fieldName + "::AnchorDeltaX");
    final Bits anchorDeltaY = parseSBits(parser, numBits.value() + 2, 0x00006, fieldName + "::AnchorDeltaY");

    return new CurvedEdgeRecord(typeFlag, straightFlag, numBits, controlDeltaX, controlDeltaY, anchorDeltaX, anchorDeltaY);
  }
View Full Code Here

TOP

Related Classes of tv.porst.splib.binaryparser.Bits

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.