Package tv.porst.splib.binaryparser

Examples of tv.porst.splib.binaryparser.Flag


    final UINT16 startWidth = parseUINT16(parser, 0x00006, fieldName + "::StartWidth");
    final UINT16 endWidth = parseUINT16(parser, 0x00006, fieldName + "::EndWidth");
    final UBits startCapStyle = parseUBits(parser, 2, 0x00006, fieldName + "::StartCapStyle");
    final UBits joinStyle = parseUBits(parser, 2, 0x00006, fieldName + "::JoinStyle");
    final Flag hasFillFlag = parseFlag(parser, 0x00006, fieldName + "::HasFillFlag");
    final Flag noHScaleFlag = parseFlag(parser, 0x00006, fieldName + "::NoHScaleFlag");
    final Flag noVScaleFlag = parseFlag(parser, 0x00006, fieldName + "::NoVScaleFlag");
    final Flag pixelHintingFlag = parseFlag(parser, 0x00006, fieldName + "::PixelHintingFlag");
    final UBits reserved = parseUBits(parser, 5, 0x00006, fieldName + "::Reserved");
    final Flag noClose = parseFlag(parser, 0x00006, fieldName + "::NoClose");
    final UBits endCapStyle = parseUBits(parser, 2, 0x00006, fieldName + "::EndCapStyle");
    final UINT16 miterLimitFactor = parseUINT16If(parser, 0x00006, joinStyle.value() == 2, fieldName + "::MiterLimitFactor");
    final RGBA startColor = RGBAParser.parseIf(parser, !hasFillFlag.value(), fieldName + "::StartColor");
    final RGBA endColor = RGBAParser.parseIf(parser, !hasFillFlag.value(), fieldName + "::EndColor");
    final MorphFillStyle fillType = MorphFillStyleParser.parseIf(parser, hasFillFlag, fieldName + "::FillType");
View Full Code Here


    final UINT16 length = parseUINT16(parser, 0x00006, fieldName + "::Length");
    final AsciiString functionName = parseString(parser, 0x00006, "::FunctionName");
    final UINT16 numParams = parseUINT16(parser, 0x00006, fieldName + "::NumParams");
    final UINT8 registerCount = parseUINT8(parser, 0x00006, fieldName + "::RegisterCount");
    final Flag preloadParentFlag = parseFlag(parser, 0x00006, fieldName + "::PreloadParentFlag");
    final Flag preloadRootFlag = parseFlag(parser, 0x00006, fieldName + "::PreloadRootFlag");
    final Flag suppressSuperFlag = parseFlag(parser, 0x00006, fieldName + "::SuppressSuperFlag");
    final Flag preloadSuperFlag = parseFlag(parser, 0x00006, fieldName + "::PreloadSuperFlag");
    final Flag suppressArgumentsFlag = parseFlag(parser, 0x00006, fieldName + "::SuppressArgumentsFlag");
    final Flag preloadArgumentsFlag = parseFlag(parser, 0x00006, fieldName + "::PreloadArgumentsFlag");
    final Flag suppressThisFlag = parseFlag(parser, 0x00006, fieldName + "::SuppressThisFlag");
    final Flag preloadThisFlag = parseFlag(parser, 0x00006, fieldName + "::PreloadThisFlag");
    final UBits reserved = parseUBits(parser, 7, 0x00006, fieldName + "::Reserved");
    final Flag preloadGlobalFlag = parseFlag(parser, 0x00006, fieldName + "::PreloadGlobalFlag");

    final List<RegisterParam> registerParams = new ArrayList<RegisterParam>();

    for (int i=0;i<numParams.value();i++) {
      registerParams.add(RegisterParamParser.parse(parser, fieldName + String.format("::RegisterParams[%d]", i)));
View Full Code Here

    }

    final RGBA defaultColor = RGBAParser.parse(parser, fieldName + "::DefaultColor");

    final UBits reserved = parseUBits(parser, 6, 0x00006, fieldName + "Reserved");
    final Flag clamp = parseFlag(parser, 0x00006, fieldName + "::Clamp");
    final Flag preserveAlpha = parseFlag(parser, 0x00006, fieldName + "::PreserveAlpha");

    return new ConvolutionFilter(matrixX, matrixY, divisor, bias, new Float32List(matrix), defaultColor, reserved, clamp, preserveAlpha);
  }
View Full Code Here

    for (int i=0;i<numZoneData.value();i++) {
      zoneData.add(ZoneDataParser.parse(parser, String.format("zoneData[%d]", i)));
    }

    final UBits reserved = parseUBits(parser, 6, 0x00006, fieldName + "::Reserved");
    final Flag zoneMaskY = parseFlag(parser, 0x00006, fieldName + "::ZoneMaskY");
    final Flag zoneMaskX = parseFlag(parser, 0x00006, fieldName + "::ZoneMaskX");

    return new ZoneRecord(numZoneData, new ZoneDataList(zoneData), reserved, zoneMaskY, zoneMaskX);
  }
View Full Code Here

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

    final Flag typeFlag = parseFlag(parser, 0x00006, fieldName + "::TypeFlag");
    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");
View Full Code Here

    final Fixed blurX = FixedParser.parse(parser, fieldName + "::BlurX");
    final Fixed blurY = FixedParser.parse(parser, fieldName + "::BlurY");
    final Fixed angle = FixedParser.parse(parser, fieldName + "::Angle");
    final Fixed distance = FixedParser.parse(parser, fieldName + "::Distance");
    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 GradientGlowFilter(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 TextRecord 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");
    final RGB textColor = RGBParser.parseIf(parser, styleFlagsHasColor, fieldName + "::TextColor");
    final INT16 xOffset = parseINT16If(parser, 0x00006, styleFlagsHasXOffset, fieldName + "::XOffset");
    final INT16 yOffset = parseINT16If(parser, 0x00006, styleFlagsHasYOffset, fieldName + "::YOffset");
    final UINT16 textHeight = parseUINT16If(parser, 0x00006, styleFlagsHasFont, fieldName + "::TextHeight");
View Full Code Here

    if (fieldName == null) {
      throw new IllegalArgumentException("Field name argument must not be null");
    }

    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();
View Full Code Here

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

    final UINT16 width = parseUINT16(parser, 0x00006, fieldName + "::Width");
    final UBits startCapStyle = parseUBits(parser, 2, 0x00006, fieldName + "::StartCapStyle");
    final UBits joinStyle = parseUBits(parser, 2, 0x00006, fieldName + "::JoinStyle");
    final Flag hasFillFlag = parseFlag(parser, 0x00006, fieldName + "::HasFillFlag");
    final Flag noHScaleFlag = parseFlag(parser, 0x00006, fieldName + "::NoHScaleFlag");
    final Flag noVScaleFlag = parseFlag(parser, 0x00006, fieldName + "::NoVScaleFlag");
    final Flag pixelHintingFlag = parseFlag(parser, 0x00006, fieldName + "::PixelHintingFlag");
    final UBits reserved = parseUBits(parser, 5, 0x00006, fieldName + "::Reserved");
    final Flag noClose = parseFlag(parser, 0x00006, fieldName + "::NoClose");
    final UBits endCapStyle = parseUBits(parser, 2, 0x00006, fieldName + "::EndCapStyle");
    final UINT16 miterLimitFactor = parseUINT16If(parser, 0x00006, joinStyle.value() == 2, fieldName + "::MiterLimitFactor");
    final RGBA color = RGBAParser.parseIf(parser, !hasFillFlag.value(), fieldName + "::Color");
    final FillStyle3 fillType = FillStyle3Parser.parseIf(parser, hasFillFlag, fieldName + "::FillType");
View Full Code Here

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

    final UINT16 condActionSize = parseUINT16(parser, 0x00006, fieldName + "::CondActionSize");
    final Flag condIdleToOverDown = parseFlag(parser, 0x00006, fieldName + "::CondIdleToOverDown");
    final Flag condOutDownToIdle = parseFlag(parser, 0x00006, fieldName + "::CondOutDownToIdle");
    final Flag condOutDownToOverDown = parseFlag(parser, 0x00006, fieldName + "::CondOutDownToOverDown");
    final Flag condOverDownToOutDown = parseFlag(parser, 0x00006, fieldName + "::CondOverDownToOutDown");
    final Flag condOverDownToOverUp = parseFlag(parser, 0x00006, fieldName + "::CondOverDownToOverUp");
    final Flag condOverUpToOverDown = parseFlag(parser, 0x00006, fieldName + "::CondOverUpToOverDown");
    final Flag condOverUpToIdle = parseFlag(parser, 0x00006, fieldName + "::CondOverUpToIdle");
    final Flag condIdleToOverUp = parseFlag(parser, 0x00006, fieldName + "::CondIdleToOverUp");
    final UBits condKeyPress = parseUBits(parser, 7, 0x00006, fieldName + "::CondKeyPress");
    final Flag condOverDownToIdle = parseFlag(parser, 0x00006, fieldName + "::CondOverDownToIdle");

    final int actionRecordSize = condActionSize.value() == 0 ? header.getNormalizedLength() - (parser.getBytePosition() - header.getBitPosition() / 8 + 1 - header.getHeaderLength()) : condActionSize.value() - 4 - 1;

    final List<Action> actions = ActionRecordParser.parse(parser, actionRecordSize, fieldName + "::Actions");

View Full Code Here

TOP

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

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.