Revision 12043 trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/core/symbols/CharacterMarkerSymbol.java
CharacterMarkerSymbol.java | ||
---|---|---|
43 | 43 |
* |
44 | 44 |
* $Id$ |
45 | 45 |
* $Log$ |
46 |
* Revision 1.20 2007-05-29 15:46:37 jaume
|
|
46 |
* Revision 1.21 2007-06-07 06:50:40 jaume
|
|
47 | 47 |
* *** empty log message *** |
48 | 48 |
* |
49 |
* Revision 1.20 2007/05/29 15:46:37 jaume |
|
50 |
* *** empty log message *** |
|
51 |
* |
|
49 | 52 |
* Revision 1.19 2007/05/28 15:36:42 jaume |
50 | 53 |
* *** empty log message *** |
51 | 54 |
* |
... | ... | |
253 | 256 |
public void draw(Graphics2D g, AffineTransform affineTransform, FShape shp) { |
254 | 257 |
g.setFont(getFont()); |
255 | 258 |
g.setColor(getColor()); |
259 |
RenderingHints old = g.getRenderingHints(); |
|
260 |
g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); |
|
256 | 261 |
double theta = getRotation(); |
257 | 262 |
int xOffset = (int) getOffset().getX(); // * multiplicador d'unitats; |
258 | 263 |
int yOffset = (int) getOffset().getY(); // * multiplicador d'unitats |
... | ... | |
284 | 289 |
|
285 | 290 |
if (theta!=0) g.rotate(-theta); |
286 | 291 |
g.translate(-(int) (p.getX() + xOffset), - (int) (p.getY() + yOffset)); |
287 |
|
|
292 |
g.setRenderingHints(old); |
|
288 | 293 |
} |
289 | 294 |
|
290 | 295 |
public int getPixExtentPlus(Graphics2D g, AffineTransform affineTransform, |
... | ... | |
331 | 336 |
// measure unit |
332 | 337 |
xml.putProperty("unit", getUnit()); |
333 | 338 |
|
339 |
// reference system |
|
340 |
xml.putProperty("referenceSystem", getReferenceSystem()); |
|
341 |
|
|
334 | 342 |
return xml; |
335 | 343 |
} |
336 | 344 |
|
... | ... | |
339 | 347 |
} |
340 | 348 |
|
341 | 349 |
public void drawInsideRectangle(Graphics2D g, AffineTransform scaleInstance, Rectangle r) { |
342 |
// g.setFont(getFont()); |
|
343 |
// g.setColor(getColor()); |
|
344 |
// |
|
345 |
// int xIni = (int) ((r.width-getSize())*0.6); |
|
346 |
// int yIni = (int) ((r.height+getSize())*0.4 /*+ getSize()*0.5*/); |
|
347 |
// |
|
348 |
// g.translate(xIni, yIni); |
|
349 |
// g.rotate(getRotation()); |
|
350 |
// |
|
351 |
// // Sirve de algo el scaleInstance??? |
|
352 |
// RenderingHints old = g.getRenderingHints(); |
|
353 |
// g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); |
|
354 |
// char[] text = new char[] { (char) unicode }; |
|
355 |
// |
|
356 |
// IMask mask = getMask(); |
|
357 |
// if (mask != null) { |
|
358 |
// FontRenderContext frc = g.getFontRenderContext(); |
|
359 |
// |
|
360 |
// GlyphVector gv = font.createGlyphVector(frc, text); |
|
361 |
// |
|
362 |
// /*p.transform(affineTransform);*/ |
|
363 |
// Shape markerShape = gv.getOutline(0,0); |
|
364 |
// IFillSymbol maskShape = mask.getFillSymbol(); |
|
365 |
// maskShape.draw(g, null, mask.getHaloShape(markerShape)); |
|
366 |
// } |
|
367 |
// g.drawChars(text, 0, text.length, (int) getOffset().getX(), (int) getOffset().getY()); |
|
368 |
// g.setRenderingHints(old); |
|
369 |
// |
|
370 |
// g.rotate(-getRotation()); |
|
371 |
// g.translate(-xIni, -yIni); |
|
372 | 350 |
draw(g, scaleInstance, new FPoint2D(r.getCenterX(), r.getCenterY())); |
373 |
|
|
374 | 351 |
} |
375 | 352 |
|
376 | 353 |
public void setUnicode(int symbol) { |
Also available in: Unified diff