mirror of
https://github.com/i2p/i2p.i2p.git
synced 2024-12-06 19:27:00 +01:00
Merge branch 'master' of i2pgit.org:i2p-hackers/i2p.i2p
This commit is contained in:
@@ -6,6 +6,7 @@ import java.awt.Font;
|
||||
import java.awt.Graphics;
|
||||
import java.awt.Paint;
|
||||
import java.awt.Stroke;
|
||||
import java.awt.Transparency;
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
@@ -735,13 +736,15 @@ public class RrdGraph implements RrdGraphConstants {
|
||||
if (c instanceof LegendText) {
|
||||
// draw with BOX
|
||||
worker.fillRect(x, y - box, box, box, gdef.getColor(ElementsNames.frame));
|
||||
Color bc = (Color) gdef.getColor(ElementsNames.back);
|
||||
Color lc = (Color) ((LegendText) c).legendColor;
|
||||
Paint bc = gdef.getColor(ElementsNames.back);
|
||||
Paint lc = ((LegendText) c).legendColor;
|
||||
boolean bt = bc.getTransparency() != Transparency.OPAQUE;
|
||||
boolean lt = lc.getTransparency() != Transparency.OPAQUE;
|
||||
// no use drawing unless both the two on top have some transparency
|
||||
if (bc.getAlpha() < 255 && lc.getAlpha() < 255)
|
||||
if (bt && lt)
|
||||
worker.fillRect(x + 1, y - box + 1, box - 2, box - 2, gdef.getColor(ElementsNames.canvas));
|
||||
// no use drawing unless the one on top has some transparency
|
||||
if (lc.getAlpha() < 255)
|
||||
if (lt)
|
||||
worker.fillRect(x + 1, y - box + 1, box - 2, box - 2, bc);
|
||||
worker.fillRect(x + 1, y - box + 1, box - 2, box - 2, lc);
|
||||
worker.drawString(c.resolvedText, x + boxSpace, y, gdef.getFont(FONTTAG_LEGEND), gdef.getColor(ElementsNames.font));
|
||||
|
||||
Reference in New Issue
Block a user