Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8256264: Printed GlyphVector outline with low DPI has bad quality on Windows #1183

Closed
Closed
Changes from 1 commit
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
@@ -362,7 +362,6 @@ public void dispose() {

private java.awt.peer.ComponentPeer dialogOwnerPeer = null;

private static final boolean enablePrecisionScale;
private static final float precisionScale = 1000.0f;
private int graphicsMode;
private double[] worldTransform = new double[6];
@@ -376,11 +375,6 @@ public void dispose() {
initIDs();

Win32FontManager.registerJREFontsForPrinting();

enablePrecisionScale =
java.security.AccessController.doPrivileged(
new sun.security.action.GetBooleanAction(
"sun.java2d.print.enablePathPrecisionScale"));
}

/* Constructors */
@@ -973,27 +967,23 @@ protected void endPath() {
}

protected float precisionScaleUp(float value) {
return enablePrecisionScale ? value * precisionScale : value;
return value * precisionScale;
}

protected float precisionScaleDown(float value) {
return enablePrecisionScale ? value / precisionScale : value;
return value / precisionScale;
}

protected void precisionScaleBegin() {
if (enablePrecisionScale) {
graphicsMode = setAdvancedGraphicsMode();
getWorldTransform(worldTransform);
float invPrecisionScale = 1.0f / precisionScale;
scale(invPrecisionScale, invPrecisionScale);
}
graphicsMode = setAdvancedGraphicsMode();
getWorldTransform(worldTransform);
float invPrecisionScale = 1.0f / precisionScale;
scale(invPrecisionScale, invPrecisionScale);
}

protected void precisionScaleEnd() {
if (enablePrecisionScale) {
setWorldTransform(worldTransform);
setGraphicsMode(graphicsMode);
}
setWorldTransform(worldTransform);
setGraphicsMode(graphicsMode);
}

protected void closeFigure() {