mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-09-27 14:11:10 +00:00
Added: Enable/disable filters
This commit is contained in:
@@ -1084,6 +1084,9 @@ public class Timeline {
|
||||
if (filters != null && filters.size() > 0) {
|
||||
// calculate size after applying the filters
|
||||
for (FILTER filter : filters) {
|
||||
if (!filter.enabled) {
|
||||
continue;
|
||||
}
|
||||
double x = filter.getDeltaX();
|
||||
double y = filter.getDeltaY();
|
||||
deltaXMax += x;
|
||||
@@ -1204,6 +1207,9 @@ public class Timeline {
|
||||
|
||||
if (filters != null) {
|
||||
for (FILTER filter : filters) {
|
||||
if (!filter.enabled) {
|
||||
continue;
|
||||
}
|
||||
img = filter.apply(img, unzoom, 0, 0, newWidth, newHeight);
|
||||
}
|
||||
}
|
||||
@@ -1703,6 +1709,9 @@ public class Timeline {
|
||||
*/
|
||||
public void getSounds(int frame, int time, ButtonTag mouseOverButton, int mouseButton, List<Integer> sounds, List<String> soundClasses, List<SOUNDINFO> soundInfos) {
|
||||
Frame fr = getFrame(frame);
|
||||
if (fr == null) {
|
||||
return;
|
||||
}
|
||||
if (time == 0) {
|
||||
sounds.addAll(fr.sounds);
|
||||
soundClasses.addAll(fr.soundClasses);
|
||||
|
||||
@@ -19,6 +19,7 @@ package com.jpexs.decompiler.flash.types.filters;
|
||||
import com.jpexs.decompiler.flash.exporters.commonshape.SVGExporter;
|
||||
import com.jpexs.decompiler.flash.types.BasicType;
|
||||
import com.jpexs.decompiler.flash.types.RGBA;
|
||||
import com.jpexs.decompiler.flash.types.annotations.Internal;
|
||||
import com.jpexs.decompiler.flash.types.annotations.SWFType;
|
||||
import com.jpexs.helpers.ConcreteClasses;
|
||||
import com.jpexs.helpers.SerializableImage;
|
||||
@@ -42,6 +43,12 @@ public abstract class FILTER implements Serializable {
|
||||
@SWFType(BasicType.UI8)
|
||||
public int id;
|
||||
|
||||
/**
|
||||
* FILTER is enabled. Used internally by Simple editor GUI. Not a real SWF field.
|
||||
*/
|
||||
@Internal
|
||||
public boolean enabled = true;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user