diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/DefineMorphShape2Tag.java b/trunk/src/com/jpexs/decompiler/flash/tags/DefineMorphShape2Tag.java index ea74121a9..497a772d6 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/DefineMorphShape2Tag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/DefineMorphShape2Tag.java @@ -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 getNeededCharacters() { + HashSet ret = new HashSet(); + ret.addAll(morphFillStyles.getNeededCharacters()); + ret.addAll(startEdges.getNeededCharacters()); + ret.addAll(endEdges.getNeededCharacters()); + return ret; + } + @Override public RECT getRect(HashMap characters) { RECT rect = new RECT(); diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/DefineMorphShapeTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/DefineMorphShapeTag.java index 788dfe09f..3af6ca90c 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/DefineMorphShapeTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/DefineMorphShapeTag.java @@ -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 getNeededCharacters() { + HashSet ret = new HashSet(); + ret.addAll(morphFillStyles.getNeededCharacters()); + ret.addAll(startEdges.getNeededCharacters()); + ret.addAll(endEdges.getNeededCharacters()); + return ret; + } + @Override public int getCharacterID() { return characterId; diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/DefineShape2Tag.java b/trunk/src/com/jpexs/decompiler/flash/tags/DefineShape2Tag.java index d5d27770e..d8e448978 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/DefineShape2Tag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/DefineShape2Tag.java @@ -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; diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/DefineShape3Tag.java b/trunk/src/com/jpexs/decompiler/flash/tags/DefineShape3Tag.java index e62b749d4..83879ccf8 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/DefineShape3Tag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/DefineShape3Tag.java @@ -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; diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/DefineShape4Tag.java b/trunk/src/com/jpexs/decompiler/flash/tags/DefineShape4Tag.java index dcdeec396..02c04013a 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/DefineShape4Tag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/DefineShape4Tag.java @@ -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; diff --git a/trunk/src/com/jpexs/decompiler/flash/tags/DefineShapeTag.java b/trunk/src/com/jpexs/decompiler/flash/tags/DefineShapeTag.java index 27f684e41..0926649c7 100644 --- a/trunk/src/com/jpexs/decompiler/flash/tags/DefineShapeTag.java +++ b/trunk/src/com/jpexs/decompiler/flash/tags/DefineShapeTag.java @@ -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; diff --git a/trunk/src/com/jpexs/decompiler/flash/types/MORPHFILLSTYLE.java b/trunk/src/com/jpexs/decompiler/flash/types/MORPHFILLSTYLE.java index 93f7f854a..bc6088e58 100644 --- a/trunk/src/com/jpexs/decompiler/flash/types/MORPHFILLSTYLE.java +++ b/trunk/src/com/jpexs/decompiler/flash/types/MORPHFILLSTYLE.java @@ -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 getNeededCharacters() { + HashSet ret = new HashSet(); + if ((fillStyleType == REPEATING_BITMAP) + || (fillStyleType == CLIPPED_BITMAP) + || (fillStyleType == NON_SMOOTHED_REPEATING_BITMAP) + || (fillStyleType == NON_SMOOTHED_CLIPPED_BITMAP)) { + ret.add(bitmapId); + } + return ret; + } } diff --git a/trunk/src/com/jpexs/decompiler/flash/types/MORPHFILLSTYLEARRAY.java b/trunk/src/com/jpexs/decompiler/flash/types/MORPHFILLSTYLEARRAY.java index 8852fc1ae..045630322 100644 --- a/trunk/src/com/jpexs/decompiler/flash/types/MORPHFILLSTYLEARRAY.java +++ b/trunk/src/com/jpexs/decompiler/flash/types/MORPHFILLSTYLEARRAY.java @@ -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 getNeededCharacters() { + HashSet ret = new HashSet(); + for (MORPHFILLSTYLE fs : fillStyles) { + ret.addAll(fs.getNeededCharacters()); + } + return ret; + } }