Skip to content

Commit

Permalink
awt: simplify a couple of expressions in GraphicContext
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosame committed Aug 17, 2024
1 parent 1d1699d commit fdc4a79
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -858,8 +858,7 @@ public FontRenderContext getFontRenderContext() {
&& antialiasingHint != RenderingHints.VALUE_ANTIALIAS_DEFAULT) {
// Antialiasing was not requested. However, if it was not turned
// off explicitly, use it.
if (antialiasingHint == RenderingHints.VALUE_ANTIALIAS_OFF)
isAntialiased = false;
isAntialiased = antialiasingHint != RenderingHints.VALUE_ANTIALIAS_OFF;
}
} else
isAntialiased = false;
Expand All @@ -869,9 +868,8 @@ public FontRenderContext getFontRenderContext() {
//
// Find out whether fractional metrics should be used.
//
boolean useFractionalMetrics = true;
if (hints.get(RenderingHints.KEY_FRACTIONALMETRICS) == RenderingHints.VALUE_FRACTIONALMETRICS_OFF)
useFractionalMetrics = false;
boolean useFractionalMetrics = hints
.get(RenderingHints.KEY_FRACTIONALMETRICS) != RenderingHints.VALUE_FRACTIONALMETRICS_OFF;

FontRenderContext frc = new FontRenderContext(defaultTransform, isAntialiased, useFractionalMetrics);
return frc;
Expand Down

0 comments on commit fdc4a79

Please sign in to comment.