MCPcopy Index your code
hub / github.com/pyfa-org/Pyfa / RenderGradientBar

Function RenderGradientBar

gui/utils/draw.py:6–20  ·  view source on GitHub ↗
(windowColor, width, height, sFactor, eFactor, mFactor=None , fillRatio=2)

Source from the content-addressed store, hash-verified

4
5
6def RenderGradientBar(windowColor, width, height, sFactor, eFactor, mFactor=None , fillRatio=2):
7
8 if sFactor == 0 and eFactor == 0 and mFactor is None:
9 return DrawFilledBitmap(width, height, windowColor)
10
11 gStart = color.GetSuitable(windowColor, sFactor)
12
13 if mFactor:
14 gMid = color.GetSuitable(windowColor, mFactor)
15 else:
16 gMid = color.GetSuitable(windowColor, sFactor + (eFactor - sFactor) / 2)
17
18 gEnd = color.GetSuitable(windowColor, eFactor)
19
20 return DrawGradientBar(width, height, gStart, gEnd, gMid, fillRatio)
21
22
23def DrawFilledBitmap(width, height, color):

Callers

nothing calls this directly

Calls 2

DrawFilledBitmapFunction · 0.85
DrawGradientBarFunction · 0.85

Tested by

no test coverage detected