Lines Matching refs:pos
124 * <var>pos</var> can be anything, even < 0 or > > 1, as the gradient
127 protected int getGradientColor(float pos) {
128 if (pos < 0.f) {
132 pos = 0.f;
137 pos = pos - (float)Math.floor(pos);
142 pos = Math.abs(pos);
145 int intPart = (int)Math.floor(pos);
146 pos = pos - intPart;
152 pos = 1.f - pos;
157 pos = 0.0f;
159 } else if (pos > 1f) {
163 pos = 1.f;
167 pos = pos - (float)Math.floor(pos);
171 int intPart = (int)Math.floor(pos);
172 pos = pos - intPart;
178 pos = 1.f - pos;
183 pos = 1.0f;
187 int index = (int)((pos * GRADIENT_SIZE) + .5);