MCPcopy Index your code
hub / github.com/BombusMod/BombusMod / drawItem

Method drawItem

src/main/java/ui/MainBar.java:74–99  ·  view source on GitHub ↗
(Graphics g, int offset, boolean selected)

Source from the content-addressed store, hash-verified

72 return Math.max(Config.getInstance().minItemHeight, super.getVHeight());
73 }
74 public void drawItem(Graphics g, int offset, boolean selected) {
75 int xo = g.getClipX();
76 int yo = g.getClipY();
77 int wo = g.getClipWidth();
78 int ho = g.getClipHeight();
79 int h = getVHeight() + 1;
80//#ifdef GRADIENT
81 Gradient gradient;
82
83 if (startColor != endColor) {
84 gradient = new Gradient(0, 0, VirtualCanvas.getInstance().getWidth(), h, startColor, endColor, false);
85 gradient.paint(g);
86 } else {
87 g.setColor(getColorBGnd());
88 g.fillRect(0, 0, VirtualCanvas.getInstance().getWidth(), h);
89 }
90//#else
91//# g.setColor(getColorBGnd());
92//# g.fillRect(0, 0, VirtualCanvas.getInstance().getWidth(), h);
93//#endif
94 g.setColor(getColor());
95
96 g.clipRect((lShift) ? 20 : 0, 0, g.getClipWidth() - ((rShift) ? 20 : 0), g.getClipHeight());
97 super.drawItem(g, offset, selected);
98 //g.setClip(xo, yo, wo, ho);
99 }
100}

Callers

nothing calls this directly

Calls 14

getVHeightMethod · 0.95
getInstanceMethod · 0.95
paintMethod · 0.95
getColorBGndMethod · 0.95
getColorMethod · 0.95
getWidthMethod · 0.65
drawItemMethod · 0.65
getClipXMethod · 0.45
getClipYMethod · 0.45
getClipWidthMethod · 0.45
getClipHeightMethod · 0.45
setColorMethod · 0.45

Tested by

no test coverage detected