Fix colour picker colour square broken by 4b7e85c
This commit is contained in:
parent
93b920a57f
commit
f86ffb48c6
@ -261,7 +261,7 @@ void ColourPickerActivity::OnDraw()
|
|||||||
{
|
{
|
||||||
for(int hue = 0; hue <= 359; hue++)
|
for(int hue = 0; hue <= 359; hue++)
|
||||||
{
|
{
|
||||||
currx = int(restrict_flt(float(hue), 0, 359))+offsetX;
|
currx = clamp_flt(float(hue), 0, 359)+offsetX;
|
||||||
if (currx == lastx)
|
if (currx == lastx)
|
||||||
continue;
|
continue;
|
||||||
lastx = currx;
|
lastx = currx;
|
||||||
@ -286,7 +286,7 @@ void ColourPickerActivity::OnDraw()
|
|||||||
}
|
}
|
||||||
|
|
||||||
//draw color square pointer
|
//draw color square pointer
|
||||||
int currentHueX = int(restrict_flt(float(currentHue), 0, 359));
|
int currentHueX = clamp_flt(float(currentHue), 0, 359);
|
||||||
int currentSaturationY = ((255-currentSaturation)/2);
|
int currentSaturationY = ((255-currentSaturation)/2);
|
||||||
g->xor_line(offsetX+currentHueX, offsetY+currentSaturationY-5, offsetX+currentHueX, offsetY+currentSaturationY-1);
|
g->xor_line(offsetX+currentHueX, offsetY+currentSaturationY-5, offsetX+currentHueX, offsetY+currentSaturationY-1);
|
||||||
g->xor_line(offsetX+currentHueX, offsetY+currentSaturationY+1, offsetX+currentHueX, offsetY+currentSaturationY+5);
|
g->xor_line(offsetX+currentHueX, offsetY+currentSaturationY+1, offsetX+currentHueX, offsetY+currentSaturationY+5);
|
||||||
|
Reference in New Issue
Block a user