[PATCH] Artifacts: Make TextStyle Make more robust
Wald Commits
scm-commit at wald.intevation.org
Fri Aug 23 14:17:41 CEST 2013
# HG changeset patch
# User Sascha L. Teichmann <teichmann at intevation.de>
# Date 1377260255 -7200
# Node ID 1f1acbe5f24389684159dedda03058cf524d47f3
# Parent a58a1a5209482b60761487473b50055b630e2f23
Artifacts: Make TextStyle Make more robust.
diff -r a58a1a520948 -r 1f1acbe5f243 artifacts/src/main/java/org/dive4elements/river/themes/TextStyle.java
--- a/artifacts/src/main/java/org/dive4elements/river/themes/TextStyle.java Fri Aug 23 12:57:21 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/themes/TextStyle.java Fri Aug 23 14:17:35 2013 +0200
@@ -37,12 +37,16 @@
}
public void apply(XYTextAnnotation ta) {
- ta.setPaint(textColor);
- ta.setFont(font);
- if (this.showBg) {
+ if (textColor != null) {
+ ta.setPaint(textColor);
+ }
+ if (font != null) {
+ ta.setFont(font);
+ }
+ if (showBg) {
ta.setBackgroundPaint(bgColor);
}
- if (this.isVertical) {
+ if (isVertical) {
ta.setRotationAngle(270f*Math.PI/180f);
}
else {
@@ -57,4 +61,4 @@
renderer.setLabelBGColor(bgColor);
}
}
-}
\ No newline at end of file
+}
More information about the Dive4elements-commits
mailing list