tags parameter removed where not needed

ImageFrame - resizing sprites to max of stage size
ButtonTag is Timelined
MorphShapeTag has getShapeAtRatio
using DefineButtonCxForm on Button1 timeline
This commit is contained in:
Jindra Petk
2014-03-05 18:19:14 +01:00
parent 7599463212
commit 1b58deff6b
20 changed files with 49 additions and 39 deletions

View File

@@ -223,8 +223,15 @@ public final class ImagePanel extends JPanel implements ActionListener, FlashDis
if (rect == null) { //??? Why?
rect = new RECT(0, 0, 1, 1);
}
SerializableImage image = new SerializableImage((int) (rect.getWidth() / SWF.unitDivisor) + 1,
(int) (rect.getHeight() / SWF.unitDivisor) + 1, SerializableImage.TYPE_INT_ARGB);
int width = rect.getWidth();
int height = rect.getHeight();
double scale = 1.0;
if (width > swf.displayRect.getWidth()) {
scale = (double) swf.displayRect.getWidth() / (double) width;
width = swf.displayRect.getWidth();
}
SerializableImage image = new SerializableImage((int) (width / SWF.unitDivisor) + 1,
(int) (height / SWF.unitDivisor) + 1, SerializableImage.TYPE_INT_ARGB);
//Make all pixels transparent
Graphics2D g = (Graphics2D) image.getGraphics();
g.setComposite(AlphaComposite.Src);
@@ -232,6 +239,7 @@ public final class ImagePanel extends JPanel implements ActionListener, FlashDis
g.fillRect(0, 0, image.getWidth(), image.getHeight());
Matrix m = new Matrix();
m.translate(-rect.Xmin, -rect.Ymin);
m.scale(scale);
drawable.toImage(frame, frame, swf.tags, characters, new Stack<Integer>(), image, m, new ColorTransform());
img = image;
} else if (drawable instanceof FontTag) {