Added Raw edit - (MORPH)GRADIENT spreadMode,interpolationMode as enums

This commit is contained in:
Jindra Petřík
2022-12-31 21:28:31 +01:00
parent 5586ac60e1
commit fcc1d37ba6
3 changed files with 18 additions and 0 deletions

View File

@@ -16,6 +16,7 @@
*/
package com.jpexs.decompiler.flash.types;
import com.jpexs.decompiler.flash.types.annotations.EnumValue;
import com.jpexs.decompiler.flash.types.annotations.SWFArray;
import com.jpexs.decompiler.flash.types.annotations.SWFType;
import java.io.Serializable;
@@ -30,6 +31,9 @@ public class GRADIENT implements Serializable {
* Spread mode
*/
@SWFType(value = BasicType.UB, count = 2)
@EnumValue(value = SPREAD_PAD_MODE, text = "Pad")
@EnumValue(value = SPREAD_REFLECT_MODE, text = "Reflect")
@EnumValue(value = SPREAD_REPEAT_MODE, text = "Repeat")
public int spreadMode;
public static final int SPREAD_PAD_MODE = 0;
@@ -44,6 +48,8 @@ public class GRADIENT implements Serializable {
* Interpolation mode
*/
@SWFType(value = BasicType.UB, count = 2)
@EnumValue(value = INTERPOLATION_RGB_MODE, text = "Normal RGB")
@EnumValue(value = INTERPOLATION_LINEAR_RGB_MODE, text = "Linear RGB")
public int interpolationMode;
public static final int INTERPOLATION_RGB_MODE = 0;

View File

@@ -16,6 +16,12 @@
*/
package com.jpexs.decompiler.flash.types;
import static com.jpexs.decompiler.flash.types.GRADIENT.INTERPOLATION_LINEAR_RGB_MODE;
import static com.jpexs.decompiler.flash.types.GRADIENT.INTERPOLATION_RGB_MODE;
import static com.jpexs.decompiler.flash.types.GRADIENT.SPREAD_PAD_MODE;
import static com.jpexs.decompiler.flash.types.GRADIENT.SPREAD_REFLECT_MODE;
import static com.jpexs.decompiler.flash.types.GRADIENT.SPREAD_REPEAT_MODE;
import com.jpexs.decompiler.flash.types.annotations.EnumValue;
import com.jpexs.decompiler.flash.types.annotations.SWFType;
import java.io.Serializable;
@@ -29,12 +35,17 @@ public class MORPHGRADIENT implements Serializable {
* Spread mode. See GRADIENT.SPREAD_* constants
*/
@SWFType(value = BasicType.UB, count = 2)
@EnumValue(value = SPREAD_PAD_MODE, text = "Pad")
@EnumValue(value = SPREAD_REFLECT_MODE, text = "Reflect")
@EnumValue(value = SPREAD_REPEAT_MODE, text = "Repeat")
public int spreadMode;
/**
* Interpolation mode. See GRADIENT.INTERPOLATION_* constants
*/
@SWFType(value = BasicType.UB, count = 2)
@EnumValue(value = INTERPOLATION_RGB_MODE, text = "Normal RGB")
@EnumValue(value = INTERPOLATION_LINEAR_RGB_MODE, text = "Linear RGB")
public int interPolationMode;
public MORPHGRADRECORD[] gradientRecords;