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

Method paintWidth

src/main/java/ui/Gradient.java:91–97  ·  view source on GitHub ↗
(Graphics g, int width)

Source from the content-addressed store, hash-verified

89
90
91 public void paintWidth(Graphics g, int width) {
92 for(int i2 = y1; i2 <= y2 - 1; i2++) {
93 int ai[] = GradBackgr(redS, greenS, blueS, redE, greenE, blueE, i2, y1, y2 - 1);
94 g.setColor(ai[0], ai[1], ai[2]);
95 g.drawLine(x1, i2, width-1, i2);
96 }
97 }
98
99 public static int[] GradBackgr(int i, int k, int l, int i1, int j1, int k1, int l1, int i2, int j2) {
100 return (new int[] { (i1*(l1-i2)+i*(j2-l1))/(j2-i2), (j1*(l1-i2)+k*(j2-l1))/ (j2-i2), (k1*(l1-i2)+l*(j2-l1))/(j2-i2)});

Callers 1

drawMethod · 0.80

Calls 3

GradBackgrMethod · 0.95
setColorMethod · 0.45
drawLineMethod · 0.45

Tested by

no test coverage detected