Skip to content

Commit 172fe27

Browse files
committed
svgom: deprecate a few interfaces
1 parent c128033 commit 172fe27

File tree

4 files changed

+32
-12
lines changed

4 files changed

+32
-12
lines changed

svgom-api/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ dependencies {
88

99
description = 'io.sf.carte:svgom-api'
1010

11-
version = '1.0.1'
11+
version = '1.1'
1212

1313
publishing.publications.maven(MavenPublication).pom {
14-
description = "SVGOM 1.0 API Java binding"
14+
description = "SVGOM 1.1 API Java binding"
1515
}

svgom-api/src/main/java/org/w3c/dom/svg/SVGColor.java

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,33 @@
1515
import org.w3c.dom.css.CSSValue;
1616
import org.w3c.dom.css.RGBColor;
1717

18+
/**
19+
* Corresponds to color value definition for properties ‘stop-color’,
20+
* ‘flood-color’ and ‘lighting-color’.
21+
*/
22+
@Deprecated(forRemoval = true)
1823
public interface SVGColor extends CSSValue {
24+
1925
// Color Types
20-
public static final short SVG_COLORTYPE_UNKNOWN = 0;
21-
public static final short SVG_COLORTYPE_RGBCOLOR = 1;
22-
public static final short SVG_COLORTYPE_RGBCOLOR_ICCCOLOR = 2;
23-
public static final short SVG_COLORTYPE_CURRENTCOLOR = 3;
26+
short SVG_COLORTYPE_UNKNOWN = 0;
27+
short SVG_COLORTYPE_RGBCOLOR = 1;
28+
short SVG_COLORTYPE_RGBCOLOR_ICCCOLOR = 2;
29+
short SVG_COLORTYPE_CURRENTCOLOR = 3;
30+
31+
short getColorType();
2432

25-
public short getColorType();
33+
default RGBColor getRGBColor() {
34+
return null;
35+
}
2636

27-
public RGBColor getRGBColor();
37+
default SVGICCColor getICCColor() {
38+
return null;
39+
}
2840

29-
public SVGICCColor getICCColor();
41+
void setRGBColor(String rgbColor) throws SVGException;
3042

31-
public void setRGBColor(String rgbColor) throws SVGException;
43+
void setRGBColorICCColor(String rgbColor, String iccColor) throws SVGException;
3244

33-
public void setRGBColorICCColor(String rgbColor, String iccColor) throws SVGException;
45+
void setColor(short colorType, String rgbColor, String iccColor) throws SVGException;
3446

35-
public void setColor(short colorType, String rgbColor, String iccColor) throws SVGException;
3647
}

svgom-api/src/main/java/org/w3c/dom/svg/SVGICCColor.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414

1515
import org.w3c.dom.DOMException;
1616

17+
/**
18+
* Expresses an ICC-based color specification.
19+
*/
20+
@Deprecated(forRemoval = true)
1721
public interface SVGICCColor {
1822
public String getColorProfile();
1923

svgom-api/src/main/java/org/w3c/dom/svg/SVGPaint.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@
1212

1313
package org.w3c.dom.svg;
1414

15+
/**
16+
* Corresponds to basic type <paint> and represents the values of properties
17+
* ‘fill’ and ‘stroke’.
18+
*/
19+
@Deprecated
1520
public interface SVGPaint extends SVGColor {
1621
// Paint Types
1722
public static final short SVG_PAINTTYPE_UNKNOWN = 0;

0 commit comments

Comments
 (0)