summaryrefslogtreecommitdiff
path: root/src/fl_oxy.cxx
diff options
context:
space:
mode:
authormaxim nikonov <maxim.nikonov@hqo.co>2026-02-06 18:12:40 +0500
committermaxim nikonov <maxim.nikonov@hqo.co>2026-02-06 18:12:40 +0500
commitb4995f979d127cea667b4e2b71c91e9db4ab52ef (patch)
treefbebc775e10932bace8d6a7c3481b1ba200c64db /src/fl_oxy.cxx
parent9575eb0a1ffa8150f70f88b5f6b55f342c3c0088 (diff)
wip
Diffstat (limited to 'src/fl_oxy.cxx')
-rw-r--r--src/fl_oxy.cxx16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/fl_oxy.cxx b/src/fl_oxy.cxx
index 6332508d6..4bac70f12 100644
--- a/src/fl_oxy.cxx
+++ b/src/fl_oxy.cxx
@@ -154,7 +154,8 @@ static void _oxy_up_box_(int x, int y, int w, int h, Fl_Color bg) {
float stepoffset = (1.0f / (float)h);
int xw = x + w - 1;
// from bottom to top
- for (int _y = y; _y < y + h; _y++) {
+ int _y;
+ for (_y = y; _y < y + h; _y++) {
fl_color(fl_color_average(bg, FL_WHITE, (gradoffset < 1.0f) ? gradoffset : 1.0f));
fl_xyline(x, _y, xw);
gradoffset += stepoffset;
@@ -172,7 +173,8 @@ static void _oxy_down_box_(int x, int y, int w, int h, Fl_Color bg) {
float stepoffset = (1.0f / (float)h);
int xw = x + w - 1;
// from top to bottom
- for (int _y = y + h - 1; _y >= y; _y--) {
+ int _y;
+ for (_y = y + h - 1; _y >= y; _y--) {
fl_color(fl_color_average(bg, FL_WHITE, (gradoffset < 1.0f) ? gradoffset : 1.0f));
fl_xyline(x, _y, xw);
gradoffset += stepoffset;
@@ -186,14 +188,15 @@ static void _oxy_button_up_box_(int x, int y, int w, int h, Fl_Color bg) {
float stepoffset = (1.0f / (float)half_h);
Fl_Color col = fl_color_average(bg, FL_WHITE, 0.5);
int xw = x + w - 1;
- for (int _y = y; _y <= y + half_h; _y++) {
+ int _y;
+ for (_y = y; _y <= y + half_h; _y++) {
fl_color(fl_color_average(col, FL_WHITE, (gradoffset < 1.0f) ? gradoffset : 1.0f));
fl_xyline(x, _y, xw);
gradoffset += stepoffset;
}
gradoffset = 0.0f;
col = bg;
- for (int _y = y + h - 1; _y >= y + half_h - 1; _y--) {
+ for (_y = y + h - 1; _y >= y + half_h - 1; _y--) {
fl_color(fl_color_average(col, FL_WHITE, (gradoffset < 1.0f) ? gradoffset : 1.0f));
fl_xyline(x, _y, xw);
gradoffset += stepoffset;
@@ -207,14 +210,15 @@ static void _oxy_button_down_box_(int x, int y, int w, int h, Fl_Color bg) {
int half_h = h / 2, xw = x + w - 1;
float gradoffset = 0.15f, stepoffset = (1.0f / (float)half_h);
Fl_Color col = fl_color_average(bg, FL_WHITE, 0.5);
- for (int _y = y; _y <= y + half_h; _y++) {
+ int _y;
+ for (_y = y; _y <= y + half_h; _y++) {
fl_color(fl_color_average(col, FL_WHITE, (gradoffset < 1.0f) ? gradoffset : 1.0f));
fl_xyline(x, _y, xw);
gradoffset += stepoffset;
}
gradoffset = 0.0f;
col = bg;
- for (int _y = y + h - 1; _y >= y + half_h - 1; _y--) {
+ for (_y = y + h - 1; _y >= y + half_h - 1; _y--) {
fl_color(fl_color_average(col, FL_WHITE, (gradoffset < 1.0f) ? gradoffset : 1.0f));
fl_xyline(x, _y, xw);
gradoffset += stepoffset;