Two-colored backgrounds for line styles.

This commit is contained in:
Andreas Schildbach 2015-05-20 22:39:26 +02:00
parent f4974bc8f2
commit 8bbeb6ad75
3 changed files with 25 additions and 1 deletions

View file

@ -252,6 +252,7 @@ public final class BvgProvider extends AbstractHafasProvider
STYLES.put("UU1", new Style(Shape.RECT, Style.rgb(84, 131, 47), Style.WHITE)); STYLES.put("UU1", new Style(Shape.RECT, Style.rgb(84, 131, 47), Style.WHITE));
STYLES.put("UU2", new Style(Shape.RECT, Style.rgb(215, 25, 16), Style.WHITE)); STYLES.put("UU2", new Style(Shape.RECT, Style.rgb(215, 25, 16), Style.WHITE));
STYLES.put("UU12", new Style(Shape.RECT, Style.rgb(84, 131, 47), Style.rgb(215, 25, 16), Style.WHITE, 0));
STYLES.put("UU3", new Style(Shape.RECT, Style.rgb(47, 152, 154), Style.WHITE)); STYLES.put("UU3", new Style(Shape.RECT, Style.rgb(47, 152, 154), Style.WHITE));
STYLES.put("UU4", new Style(Shape.RECT, Style.rgb(255, 233, 42), Style.BLACK)); STYLES.put("UU4", new Style(Shape.RECT, Style.rgb(255, 233, 42), Style.BLACK));
STYLES.put("UU5", new Style(Shape.RECT, Style.rgb(91, 31, 16), Style.WHITE)); STYLES.put("UU5", new Style(Shape.RECT, Style.rgb(91, 31, 16), Style.WHITE));

View file

@ -140,6 +140,7 @@ public class MvvProvider extends AbstractEfaProvider
STYLES.put("UU4", new Style(Style.parseColor("#00ccaa"), Style.WHITE)); STYLES.put("UU4", new Style(Style.parseColor("#00ccaa"), Style.WHITE));
STYLES.put("UU5", new Style(Style.parseColor("#bb7700"), Style.WHITE)); STYLES.put("UU5", new Style(Style.parseColor("#bb7700"), Style.WHITE));
STYLES.put("UU6", new Style(Style.parseColor("#0000cc"), Style.WHITE)); STYLES.put("UU6", new Style(Style.parseColor("#0000cc"), Style.WHITE));
STYLES.put("UU7", new Style(Style.parseColor("#227700"), Style.parseColor("#bb0000"), Style.WHITE, 0));
} }
@Override @Override

View file

@ -29,7 +29,7 @@ public class Style implements Serializable
private static final long serialVersionUID = 7145603493425043304L; private static final long serialVersionUID = 7145603493425043304L;
public final Shape shape; public final Shape shape;
public final int backgroundColor; public final int backgroundColor, backgroundColor2;
public final int foregroundColor; public final int foregroundColor;
public final int borderColor; public final int borderColor;
@ -42,6 +42,7 @@ public class Style implements Serializable
{ {
this.shape = Shape.ROUNDED; this.shape = Shape.ROUNDED;
this.backgroundColor = backgroundColor; this.backgroundColor = backgroundColor;
this.backgroundColor2 = 0;
this.foregroundColor = foregroundColor; this.foregroundColor = foregroundColor;
this.borderColor = 0; this.borderColor = 0;
} }
@ -50,6 +51,7 @@ public class Style implements Serializable
{ {
this.shape = checkNotNull(shape); this.shape = checkNotNull(shape);
this.backgroundColor = backgroundColor; this.backgroundColor = backgroundColor;
this.backgroundColor2 = 0;
this.foregroundColor = foregroundColor; this.foregroundColor = foregroundColor;
this.borderColor = 0; this.borderColor = 0;
} }
@ -58,6 +60,16 @@ public class Style implements Serializable
{ {
this.shape = checkNotNull(shape); this.shape = checkNotNull(shape);
this.backgroundColor = backgroundColor; this.backgroundColor = backgroundColor;
this.backgroundColor2 = 0;
this.foregroundColor = foregroundColor;
this.borderColor = borderColor;
}
public Style(final Shape shape, final int backgroundColor, final int backgroundColor2, final int foregroundColor, final int borderColor)
{
this.shape = checkNotNull(shape);
this.backgroundColor = backgroundColor;
this.backgroundColor2 = backgroundColor2;
this.foregroundColor = foregroundColor; this.foregroundColor = foregroundColor;
this.borderColor = borderColor; this.borderColor = borderColor;
} }
@ -66,6 +78,16 @@ public class Style implements Serializable
{ {
this.shape = Shape.ROUNDED; this.shape = Shape.ROUNDED;
this.backgroundColor = backgroundColor; this.backgroundColor = backgroundColor;
this.backgroundColor2 = 0;
this.foregroundColor = foregroundColor;
this.borderColor = borderColor;
}
public Style(final int backgroundColor, final int backgroundColor2, final int foregroundColor, final int borderColor)
{
this.shape = Shape.ROUNDED;
this.backgroundColor = backgroundColor;
this.backgroundColor2 = backgroundColor2;
this.foregroundColor = foregroundColor; this.foregroundColor = foregroundColor;
this.borderColor = borderColor; this.borderColor = borderColor;
} }