Parcourir la source

FOP-2544: Incorrect pdf rendering from FO with embedded svg via java embedding

git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1777615 13f79535-47bb-0310-9956-ffa450edef68
pull/57/head
Simon Steiner il y a 7 ans
Parent
révision
1ba6eb7bbb

+ 4
- 3
fop-core/src/main/java/org/apache/fop/svg/NativeTextPainter.java Voir le fichier

@@ -63,6 +63,7 @@ public abstract class NativeTextPainter extends StrokingTextPainter {

/** the logger for this class */
protected static final Log log = LogFactory.getLog(NativeTextPainter.class);
private static final boolean DEBUG = false;

/** the font collection */
protected final FontInfo fontInfo;
@@ -115,7 +116,7 @@ public abstract class NativeTextPainter extends StrokingTextPainter {
textRun.getLayout().draw(g2d);
return;
} else {
GeneralPath debugShapes = log.isDebugEnabled() ? new GeneralPath() : null;
GeneralPath debugShapes = new GeneralPath();
preparePainting(g2d);
saveGraphicsState();
setInitialTransform(g2d.getTransform());
@@ -124,7 +125,7 @@ public abstract class NativeTextPainter extends StrokingTextPainter {
writeGlyphs((FOPGVTGlyphVector) gv, debugShapes);
endTextObject();
restoreGraphicsState();
if (debugShapes != null) {
if (DEBUG) {
g2d.setStroke(new BasicStroke(0));
g2d.setColor(Color.LIGHT_GRAY);
g2d.draw(debugShapes);
@@ -147,7 +148,7 @@ public abstract class NativeTextPainter extends StrokingTextPainter {
if (log.isTraceEnabled()) {
log.trace("pos " + glyphPos + ", transform " + glyphTransform);
}
if (debugShapes != null) {
if (DEBUG) {
Shape sh = gv.getGlyphLogicalBounds(index);
if (sh == null) {
sh = new Ellipse2D.Double(glyphPos.getX(), glyphPos.getY(), 2, 2);

Chargement…
Annuler
Enregistrer