Enum for ExporterInfo flags

This commit is contained in:
Jindra Petřík
2024-08-05 11:17:25 +02:00
parent 833e1114fc
commit 2336515b17
2 changed files with 32 additions and 10 deletions
@@ -21,6 +21,7 @@ import com.jpexs.decompiler.flash.SWFInputStream;
import com.jpexs.decompiler.flash.SWFOutputStream;
import com.jpexs.decompiler.flash.tags.Tag;
import com.jpexs.decompiler.flash.tags.TagInfo;
import com.jpexs.decompiler.flash.tags.gfx.enums.ExportFlagConstants;
import com.jpexs.decompiler.flash.tags.gfx.enums.FileFormatType;
import com.jpexs.helpers.ByteArrayRange;
import java.io.IOException;
@@ -49,15 +50,7 @@ public class ExporterInfo extends Tag {
public String swfName;
public List<Long> codeOffsets;
public static final int FLAG_CONTAINS_GLYPH_TEXTURES = 1;
public static final int FLAG_GLYPHS_STRIPPED_FROM_DEFINEFONT = 2;
public static final int FLAG_GRADIENT_IMAGES_EXPORTED = 4;
public static final int FLAG_SHAPES_STRIPPED_FROM_DEFINEFONT = 16;
public List<Long> codeOffsets;
/**
* Gets data bytes
@@ -144,6 +137,6 @@ public class ExporterInfo extends Tag {
}
public boolean hasFlagShapesStrippedFromDefineFont() {
return (flags & FLAG_SHAPES_STRIPPED_FROM_DEFINEFONT) == FLAG_SHAPES_STRIPPED_FROM_DEFINEFONT;
return (flags & ExportFlagConstants.EXF_GLYPHS_STRIPPED) == ExportFlagConstants.EXF_GLYPHS_STRIPPED;
}
}
@@ -0,0 +1,29 @@
/*
* Copyright (C) 2010-2024 JPEXS, All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
package com.jpexs.decompiler.flash.tags.gfx.enums;
/**
*
* @author JPEXS
*/
public class ExportFlagConstants {
public static final int EXF_GLYPH_TEXTURES_EXPORTED = 0X01;
public static final int EXF_GRADIENT_TEXTURES_EXPORTED = 0X02;
public static final int EXF_GLYPHS_STRIPPED = 0X10;
}