Examples of IParsedINTElement


Examples of tv.porst.splib.binaryparser.IParsedINTElement

    // Reading the CodeTableOffset is tricky. I have seen valid tags with NumGlyphs=0 where
    // the CodeTableOffset was omitted and I have seen some that have it.
    final boolean parseCodeTableOffset = parser.getBytePosition() < endPosition;

    final IParsedINTElement codeTableOffset = parseCodeTableOffset ? (fontFlagsWideOffsets.value() ? parseUINT32(parser, 0x00006, "DefineFont3::CodeTableOffset") : parseUINT16(parser, 0x00006, "DefineFont3::CodeTableOffset")) : null;

    final List<Shape3> glyphShapeTable = new ArrayList<Shape3>();

    for (int i=0;i<numGlyphs.value();i++) {
      glyphShapeTable.add(Shape3Parser.parse(parser, String.format("GlyphShapeTable[%d]", i)));
View Full Code Here

Examples of tv.porst.splib.binaryparser.IParsedINTElement

      else {
        offsetTable.add(parseUINT16(parser, 0x00006, String.format("DefineFont2::OffsetTable[%d]", i)));
      }
    }

    final IParsedINTElement codeTableOffset = fontFlagsWideOffsets.value() ? parseUINT32(parser, 0x00006, "DefineFont2::CodeTableOffset") : parseUINT16(parser, 0x00006, "DefineFont2::CodeTableOffset");

    final List<Shape> glyphShapeTable = new ArrayList<Shape>();

    for (int i=0;i<numGlyphs.value();i++) {
      glyphShapeTable.add(ShapeParser.parse(parser, String.format("GlyphShapeTable[%d]", i)));
View Full Code Here

Examples of tv.porst.splib.binaryparser.IParsedINTElement

      clipActionRecords.add(ClipActionRecordParser.parse(parser, version, fieldName));

    } while (true);

    final IParsedINTElement clipActionEndFlag = version <= 5 ? parseUINT16(parser, 0x00006, fieldName + "::ClipActionsEndFlag") : parseUINT32(parser, 0x00006, fieldName + "::ClipActionsEndFlag");

    return new ClipActions(reserved, allEventFlags, new ClipActionRecordList(clipActionRecords), clipActionEndFlag);
  }
View Full Code Here

Examples of tv.porst.splib.binaryparser.IParsedINTElement

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

    final IParsedINTElement fontKerningCode1 = fontFlagsWideCodes ? parseUINT16(parser, 0x00006, fieldName + "::FontKerningCode1") : parseUINT8(parser, 0x00006, fieldName + "::FontKerningCode1");
    final IParsedINTElement fontKerningCode2 = fontFlagsWideCodes ? parseUINT16(parser, 0x00006, fieldName + "::FontKerningCode2") : parseUINT8(parser, 0x00006, fieldName + "::FontKerningCode2");
    final INT16 fontKerningAdjustment = parseINT16(parser, 0x00006, fieldName + "::FontKerningAdjustment");

    return new KerningRecord(fontKerningCode1, fontKerningCode2, fontKerningAdjustment);
  }
View Full Code Here

Examples of tv.porst.splib.binaryparser.IParsedINTElement

    visitor.visit(clipActions, "AllEventFlags", clipActions.getAllEventFlags());
    visit(clipActions.getAllEventFlags(), visitor);
    visitor.visit(clipActions, "ClipActionRecords", clipActions.getClipActionRecords());
    visit(clipActions.getClipActionRecords(), visitor);

    final IParsedINTElement endFlag = clipActions.getClipActionEndFlag();

    if (endFlag instanceof UINT16) {
      visitor.visit(clipActions, "ClipActionEndFlag", (UINT16) clipActions.getClipActionEndFlag());
    }
    else  {
View Full Code Here

Examples of tv.porst.splib.binaryparser.IParsedINTElement

    visitor.visit(tag, "FontName", tag.getFontName());
    visitor.visit(tag, "NumGlyphs", tag.getNumGlyphs());
    visitor.visit(tag, "OffsetTable", tag.getOffsetTable());
    visit(tag.getOffsetTable(), visitor);

    final IParsedINTElement codeTableOffset = tag.getCodeTableOffset();

    if (codeTableOffset instanceof UINT16) {
      visitor.visit(tag, "CodeTableOffset", (UINT16) tag.getCodeTableOffset());
    } else {
      visitor.visit(tag, "CodeTableOffset", (UINT32) tag.getCodeTableOffset());
View Full Code Here

Examples of tv.porst.splib.binaryparser.IParsedINTElement

    visitor.visit(tag, "FontName", tag.getFontName());
    visitor.visit(tag, "NumGlyphs", tag.getNumGlyphs());
    visitor.visit(tag, "OffsetTable", tag.getOffsetTable());
    visit(tag.getOffsetTable(), visitor);

    final IParsedINTElement codeTableOffset = tag.getCodeTableOffset();

    if (codeTableOffset instanceof UINT16) {
      visitor.visit(tag, "CodeTableOffset", (UINT16) tag.getCodeTableOffset());
    } else {
      visitor.visit(tag, "CodeTableOffset", (UINT32) tag.getCodeTableOffset());
View Full Code Here

Examples of tv.porst.splib.binaryparser.IParsedINTElement

    if (kerningRecord == null) {
      return;
    }

    final IParsedINTElement kerningCode1 = kerningRecord.getFontKerningCode1();

    if (kerningCode1 instanceof UINT16) {
      visitor.visit(kerningRecord, "FontKerningCode1", (UINT16) kerningCode1);
    }
    else  {
      visitor.visit(kerningRecord, "FontKerningCode1", (UINT32) kerningCode1);
    }

    final IParsedINTElement kerningCode2 = kerningRecord.getFontKerningCode1();

    if (kerningCode1 instanceof UINT16) {
      visitor.visit(kerningRecord, "FontKerningCode2", (UINT16) kerningCode2);
    }
    else  {
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.