Package tv.porst.splib.binaryparser

Examples of tv.porst.splib.binaryparser.UBits


    final Flag stateNewStyles = parseFlag(parser, 0x00006, fieldName + "::StateNewStyles");
    final Flag stateLineStyle = parseFlag(parser, 0x00006, fieldName + "::StateLineStyle");
    final Flag stateFillStyle1 = parseFlag(parser, 0x00006, fieldName + "::StateFillStyle1");
    final Flag stateFillStyle0 = parseFlag(parser, 0x00006, fieldName + "::StateFillStyle0");
    final Flag stateMoveTo = parseFlag(parser, 0x00006, fieldName + "::StateMoveTo");
    final UBits moveBits = parseUBitsIf(parser, 5, 0x00006, stateMoveTo, fieldName + "::MoveBits");
    final UBits moveDeltaX = parseUBitsIf(parser, moveBits == null ? 0 : moveBits.value(), 0x00006, stateMoveTo, fieldName + "::MoveDeltaX");
    final UBits moveDeltaY = parseUBitsIf(parser, moveBits == null ? 0 : moveBits.value(), 0x00006, stateMoveTo, fieldName + "::MoveDeltaY");
    final UBits fillStyle0 = parseUBitsIf(parser, fillBits == null ? 0 : fillBits.value(), 0x00006, stateFillStyle0, fieldName + "::FillStyle0");
    final UBits fillStyle1 = parseUBitsIf(parser, fillBits == null ? 0 : fillBits.value(), 0x00006, stateFillStyle1, fieldName + "::FillStyle1");
    final UBits lineStyle = parseUBitsIf(parser, lineBits == null ? 0 : lineBits.value(), 0x00006, stateLineStyle, fieldName + "::LineStyle");

    if (stateNewStyles.value()) {
      parser.align();
    }

    final FillStyle3Array fillStyles = FillStyle3ArrayParser.parseIf(parser, stateNewStyles, fieldName + "::FillStyles");
    final LineStyle4Array lineStyles = LineStyle4ArrayParser.parseIf(parser, stateNewStyles, fieldName + "::LineStyles");
    final UBits numFillBits = parseUBitsIf(parser, 4, 0x00006, stateNewStyles, fieldName + "::NumFillBits");
    final UBits numLineBits = parseUBitsIf(parser, 4, 0x00006, stateNewStyles, fieldName + "::NumLineBits");

    return new StyleChangeRecord4(typeFlag, stateNewStyles, stateLineStyle, stateFillStyle1,
        stateFillStyle0, stateMoveTo, moveBits, moveDeltaX, moveDeltaY, fillStyle0, fillStyle1,
        lineStyle, fillStyles, lineStyles, numFillBits, numLineBits);
  }
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

    final Fixed8 strength = Fixed8Parser.parse(parser, fieldName + "::Strength");
    final Flag innerShadow = parseFlag(parser, 0x00006, fieldName + "::InnerShadow");
    final Flag knockout = parseFlag(parser, 0x00006, fieldName + "::KnockOut");
    final Flag compositeSource = parseFlag(parser, 0x00006, fieldName + "::CompositeSource");
    final Flag onTop = parseFlag(parser, 0x00006, fieldName + "::OnTop");
    final UBits passes = parseUBits(parser, 4, 0x00006, fieldName + "::Passes");

    return new GradientBevelFilter(numColors, new RGBAList(gradientColors), new UINT8List(gradientRatio), blurX, blurY, angle, distance, strength, innerShadow, knockout, compositeSource, onTop, passes);
  }
View Full Code Here

   *
   * @throws SWFParserException Thrown if the structure could not be parsed.
   */
  public static Shape3 parse(final SWFBinaryParser parser, final String fieldName) throws SWFParserException {

    final UBits numFillBits = parseUBits(parser, 4, 0x00006, fieldName + "::NumFillBits");
    final UBits numLineBits = parseUBits(parser, 4, 0x00006, fieldName + "::NumLineBits");
    final List<Shape3Record> shapeRecords = new ArrayList<Shape3Record>();

    Shape3Record shapeRecord = null;

    UBits currentNumFillBits = numFillBits;
    UBits currentNumLineBits = numLineBits;

    do {

      shapeRecord = ShapeRecord3Parser.parse(parser, currentNumFillBits, currentNumLineBits, fieldName + "::ShapeRecord");

View Full Code Here

public class ActionTryParser {

  public static ActionTry parse(final SWFBinaryParser parser, final UINT8 actionCode, final String fieldName) throws SWFParserException {

    final UINT16 length = parseUINT16(parser, 0x00006, fieldName + "::Length");
    final UBits reserved = parseUBits(parser, 5, 0x00006, fieldName + "::Reserved");
    final Flag catchInRegisterFlag = parseFlag(parser, 0x00006, fieldName + "::CatchInRegisterFlag");
    final Flag finallyBlockFlag = parseFlag(parser, 0x00006, fieldName + "::FinallyBlockFlag");
    final Flag catchBlockFlag = parseFlag(parser, 0x00006, fieldName + "::CatchBlockFlag");
    final UINT16 trySize = parseUINT16(parser, 0x00006, fieldName + "::TrySize");
    final UINT16 catchSize = parseUINT16(parser, 0x00006, fieldName + "::CatchSize");
View Full Code Here

   */
  public static ShapeWithStyle3 parse(final SWFBinaryParser parser, final String fieldName) throws SWFParserException {

    final FillStyle3Array fillStyles = FillStyle3ArrayParser.parse(parser, fieldName + "::FillStyles");
    final LineStyle3Array lineStyles = LineStyle3ArrayParser.parse(parser, fieldName + "::LineStyles");
    final UBits numFillBits = parseUBits(parser, 4, 0x00006, fieldName + "::NumFillBits");
    final UBits numLineBits = parseUBits(parser, 4, 0x00006, fieldName + "::NumLineBits");
    final List<Shape3Record> shapeRecords = new ArrayList<Shape3Record>();

    Shape3Record shapeRecord = null;

    UBits currentNumFillBits = numFillBits;
    UBits currentNumLineBits = numLineBits;

    do {

      shapeRecord = ShapeRecord3Parser.parse(parser, currentNumFillBits, currentNumLineBits, fieldName + "::ShapeRecord");

View Full Code Here

   * @throws SWFParserException Thrown if the structure could not be parsed.
   */
  public static TextRecord2 parse(final SWFBinaryParser parser, final int glyphBits, final int advanceBits, final String fieldName) throws SWFParserException {

    final Flag textRecordType = parseFlag(parser, 0x00006, fieldName + "::TextRecordType");
    final UBits styleFlagsReserved = parser.readBits(3);
    final Flag styleFlagsHasFont = parseFlag(parser, 0x00006, fieldName + "::StyleFlagsHasFont");
    final Flag styleFlagsHasColor = parseFlag(parser, 0x00006, fieldName + "::StyleFlagsHasColor");
    final Flag styleFlagsHasYOffset = parseFlag(parser, 0x00006, fieldName + "::StyleFlagsHasYOffset");
    final Flag styleFlagsHasXOffset = parseFlag(parser, 0x00006, fieldName + "::StyleFlagsHasXOffset");
    final UINT16 fontID = parseUINT16If(parser, 0x00006, styleFlagsHasFont, fieldName + "::FontID");
View Full Code Here

    final Fixed blurY = FixedParser.parse(parser, fieldName + "::BlurY");
    final Fixed8 strength = Fixed8Parser.parse(parser, fieldName + "::Strength");
    final Flag innerShadow = parseFlag(parser, 0x00006, fieldName + "::InnerShadow");
    final Flag knockout = parseFlag(parser, 0x00006, fieldName + "::KnockOut");
    final Flag compositeSource = parseFlag(parser, 0x00006, fieldName + "::CompositeSource");
    final UBits passes = parseUBits(parser, 5, 0x00006, fieldName + "::Passes");

    return new GlowFilter(glowColor, blurX, blurY, strength, innerShadow, knockout, compositeSource, passes);
  }
View Full Code Here

TOP

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

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.