mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-05-31 19:54:37 +00:00
better displaying shapes/morpshapes with bitmap shapes
This commit is contained in:
@@ -18,7 +18,6 @@ package com.jpexs.decompiler.flash.tags;
|
||||
|
||||
import com.jpexs.decompiler.flash.SWFInputStream;
|
||||
import com.jpexs.decompiler.flash.SWFOutputStream;
|
||||
import com.jpexs.decompiler.flash.tags.base.AloneTag;
|
||||
import com.jpexs.decompiler.flash.tags.base.BoundedTag;
|
||||
import com.jpexs.decompiler.flash.tags.base.CharacterTag;
|
||||
import com.jpexs.decompiler.flash.types.MORPHFILLSTYLEARRAY;
|
||||
@@ -30,13 +29,15 @@ import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author JPEXS
|
||||
*/
|
||||
public class DefineMorphShape2Tag extends CharacterTag implements BoundedTag, AloneTag {
|
||||
public class DefineMorphShape2Tag extends CharacterTag implements BoundedTag {
|
||||
|
||||
public int characterId;
|
||||
public RECT startBounds;
|
||||
@@ -50,6 +51,15 @@ public class DefineMorphShape2Tag extends CharacterTag implements BoundedTag, Al
|
||||
public SHAPE startEdges;
|
||||
public SHAPE endEdges;
|
||||
|
||||
@Override
|
||||
public Set<Integer> getNeededCharacters() {
|
||||
HashSet<Integer> ret = new HashSet<Integer>();
|
||||
ret.addAll(morphFillStyles.getNeededCharacters());
|
||||
ret.addAll(startEdges.getNeededCharacters());
|
||||
ret.addAll(endEdges.getNeededCharacters());
|
||||
return ret;
|
||||
}
|
||||
|
||||
@Override
|
||||
public RECT getRect(HashMap<Integer, CharacterTag> characters) {
|
||||
RECT rect = new RECT();
|
||||
|
||||
@@ -18,7 +18,6 @@ package com.jpexs.decompiler.flash.tags;
|
||||
|
||||
import com.jpexs.decompiler.flash.SWFInputStream;
|
||||
import com.jpexs.decompiler.flash.SWFOutputStream;
|
||||
import com.jpexs.decompiler.flash.tags.base.AloneTag;
|
||||
import com.jpexs.decompiler.flash.tags.base.BoundedTag;
|
||||
import com.jpexs.decompiler.flash.tags.base.CharacterTag;
|
||||
import com.jpexs.decompiler.flash.types.MORPHFILLSTYLEARRAY;
|
||||
@@ -30,13 +29,15 @@ import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author JPEXS
|
||||
*/
|
||||
public class DefineMorphShapeTag extends CharacterTag implements BoundedTag, AloneTag {
|
||||
public class DefineMorphShapeTag extends CharacterTag implements BoundedTag {
|
||||
|
||||
public int characterId;
|
||||
public RECT startBounds;
|
||||
@@ -46,6 +47,15 @@ public class DefineMorphShapeTag extends CharacterTag implements BoundedTag, Alo
|
||||
public SHAPE startEdges;
|
||||
public SHAPE endEdges;
|
||||
|
||||
@Override
|
||||
public Set<Integer> getNeededCharacters() {
|
||||
HashSet<Integer> ret = new HashSet<Integer>();
|
||||
ret.addAll(morphFillStyles.getNeededCharacters());
|
||||
ret.addAll(startEdges.getNeededCharacters());
|
||||
ret.addAll(endEdges.getNeededCharacters());
|
||||
return ret;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getCharacterID() {
|
||||
return characterId;
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
package com.jpexs.decompiler.flash.tags;
|
||||
|
||||
import com.jpexs.decompiler.flash.SWFInputStream;
|
||||
import com.jpexs.decompiler.flash.tags.base.AloneTag;
|
||||
import com.jpexs.decompiler.flash.tags.base.BoundedTag;
|
||||
import com.jpexs.decompiler.flash.tags.base.CharacterTag;
|
||||
import com.jpexs.decompiler.flash.tags.base.ShapeTag;
|
||||
@@ -28,7 +27,7 @@ import java.io.IOException;
|
||||
import java.util.HashMap;
|
||||
import java.util.Set;
|
||||
|
||||
public class DefineShape2Tag extends CharacterTag implements BoundedTag, AloneTag, ShapeTag {
|
||||
public class DefineShape2Tag extends CharacterTag implements BoundedTag, ShapeTag {
|
||||
|
||||
public int shapeId;
|
||||
public RECT shapeBounds;
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
package com.jpexs.decompiler.flash.tags;
|
||||
|
||||
import com.jpexs.decompiler.flash.SWFInputStream;
|
||||
import com.jpexs.decompiler.flash.tags.base.AloneTag;
|
||||
import com.jpexs.decompiler.flash.tags.base.BoundedTag;
|
||||
import com.jpexs.decompiler.flash.tags.base.CharacterTag;
|
||||
import com.jpexs.decompiler.flash.tags.base.ShapeTag;
|
||||
@@ -28,7 +27,7 @@ import java.io.IOException;
|
||||
import java.util.HashMap;
|
||||
import java.util.Set;
|
||||
|
||||
public class DefineShape3Tag extends CharacterTag implements BoundedTag, AloneTag, ShapeTag {
|
||||
public class DefineShape3Tag extends CharacterTag implements BoundedTag, ShapeTag {
|
||||
|
||||
public int shapeId;
|
||||
public RECT shapeBounds;
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
package com.jpexs.decompiler.flash.tags;
|
||||
|
||||
import com.jpexs.decompiler.flash.SWFInputStream;
|
||||
import com.jpexs.decompiler.flash.tags.base.AloneTag;
|
||||
import com.jpexs.decompiler.flash.tags.base.BoundedTag;
|
||||
import com.jpexs.decompiler.flash.tags.base.CharacterTag;
|
||||
import com.jpexs.decompiler.flash.tags.base.ShapeTag;
|
||||
@@ -28,7 +27,7 @@ import java.io.IOException;
|
||||
import java.util.HashMap;
|
||||
import java.util.Set;
|
||||
|
||||
public class DefineShape4Tag extends CharacterTag implements BoundedTag, AloneTag, ShapeTag {
|
||||
public class DefineShape4Tag extends CharacterTag implements BoundedTag, ShapeTag {
|
||||
|
||||
public int shapeId;
|
||||
public RECT shapeBounds;
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
package com.jpexs.decompiler.flash.tags;
|
||||
|
||||
import com.jpexs.decompiler.flash.SWFInputStream;
|
||||
import com.jpexs.decompiler.flash.tags.base.AloneTag;
|
||||
import com.jpexs.decompiler.flash.tags.base.BoundedTag;
|
||||
import com.jpexs.decompiler.flash.tags.base.CharacterTag;
|
||||
import com.jpexs.decompiler.flash.tags.base.ShapeTag;
|
||||
@@ -28,7 +27,7 @@ import java.io.IOException;
|
||||
import java.util.HashMap;
|
||||
import java.util.Set;
|
||||
|
||||
public class DefineShapeTag extends CharacterTag implements BoundedTag, AloneTag, ShapeTag {
|
||||
public class DefineShapeTag extends CharacterTag implements BoundedTag, ShapeTag {
|
||||
|
||||
public int shapeId;
|
||||
public RECT shapeBounds;
|
||||
|
||||
@@ -16,11 +16,15 @@
|
||||
*/
|
||||
package com.jpexs.decompiler.flash.types;
|
||||
|
||||
import com.jpexs.decompiler.flash.tags.base.NeedsCharacters;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author JPEXS
|
||||
*/
|
||||
public class MORPHFILLSTYLE {
|
||||
public class MORPHFILLSTYLE implements NeedsCharacters {
|
||||
|
||||
public int fillStyleType;
|
||||
public static final int SOLID = 0x0;
|
||||
@@ -38,4 +42,16 @@ public class MORPHFILLSTYLE {
|
||||
public int bitmapId;
|
||||
public MATRIX startBitmapMatrix;
|
||||
public MATRIX endBitmapMatrix;
|
||||
|
||||
@Override
|
||||
public Set<Integer> getNeededCharacters() {
|
||||
HashSet<Integer> ret = new HashSet<Integer>();
|
||||
if ((fillStyleType == REPEATING_BITMAP)
|
||||
|| (fillStyleType == CLIPPED_BITMAP)
|
||||
|| (fillStyleType == NON_SMOOTHED_REPEATING_BITMAP)
|
||||
|| (fillStyleType == NON_SMOOTHED_CLIPPED_BITMAP)) {
|
||||
ret.add(bitmapId);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,11 +16,24 @@
|
||||
*/
|
||||
package com.jpexs.decompiler.flash.types;
|
||||
|
||||
import com.jpexs.decompiler.flash.tags.base.NeedsCharacters;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author JPEXS
|
||||
*/
|
||||
public class MORPHFILLSTYLEARRAY {
|
||||
public class MORPHFILLSTYLEARRAY implements NeedsCharacters {
|
||||
|
||||
public MORPHFILLSTYLE fillStyles[];
|
||||
|
||||
@Override
|
||||
public Set<Integer> getNeededCharacters() {
|
||||
HashSet<Integer> ret = new HashSet<Integer>();
|
||||
for (MORPHFILLSTYLE fs : fillStyles) {
|
||||
ret.addAll(fs.getNeededCharacters());
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user