Revision 29463
trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/core/symbols/SimpleTextSymbol.java | ||
---|---|---|
92 | 92 |
if (!isShapeVisible()) return; |
93 | 93 |
g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); |
94 | 94 |
g.setColor(textColor); |
95 |
float size=font.getSize2D(); |
|
96 |
if (properties!=null){ |
|
97 |
PrintQuality pq = (PrintQuality) properties.get(PrintQuality.class); |
|
98 |
if (pq.equals(PrintQuality.NORMAL)){ |
|
99 |
size *= (float) 300/72; |
|
100 |
}else if (pq.equals(PrintQuality.HIGH)){ |
|
101 |
size *= (float) 600/72; |
|
102 |
}else if (pq.equals(PrintQuality.DRAFT)){ |
|
103 |
// unitFactor *= 72; (which is the same than doing nothing) |
|
104 |
} |
|
105 |
font=font.deriveFont(size); |
|
106 |
} |
|
107 | 95 |
g.setFont(font); |
108 | 96 |
g.translate(((FPoint2D) shp).getX(), ((FPoint2D) shp).getY()); |
109 | 97 |
|
... | ... | |
115 | 103 |
// Alineamos el texto de manera que la parte superior |
116 | 104 |
// izquierda de la primera letra est? en (0,0). |
117 | 105 |
g.drawString(getText(), 0, (int)-bounds.getY()); |
118 |
if (properties!=null){ |
|
119 |
font=font.deriveFont(size); |
|
120 |
g.setFont(font); |
|
121 |
} |
|
122 | 106 |
g.rotate(-rotation); |
123 | 107 |
g.translate(-((FPoint2D) shp).getX(), -((FPoint2D) shp).getY()); |
124 | 108 |
} |
Also available in: Unified diff