diff --git a/CHANGELOG.md b/CHANGELOG.md index 4d4227bfe..c778054af 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ All notable changes to this project will be documented in this file. - [#1905] Key strokes on folder preview panel - Scrollbars - Morphshape transforming, point editation +- Raw edit - (MORPH)GRADIENT spreadMode,interpolationMode as enums ### Fixed - [#1915] SVG import - gradient when it has two final stops diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/GRADIENT.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/GRADIENT.java index f4cbceac6..b2d457c0b 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/GRADIENT.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/GRADIENT.java @@ -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; diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/MORPHGRADIENT.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/MORPHGRADIENT.java index 625922ca9..877d88426 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/MORPHGRADIENT.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/types/MORPHGRADIENT.java @@ -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;