+ else if (st->ratio < mode2) /* squeeze from the top/bottom */
+ {
+ double ratio = (st->ratio - mode1) / (mode2 - mode1);
+ double prev_ratio = (st->prev_ratio - mode1) / (mode2 - mode1);
+ int max = st->height / 2;
+ int step = (max * ratio) - (max * prev_ratio);
+
+ if (step <= 0)
+ step = 1;
+
+ /* fill middle */
+ XFillRectangle (st->dpy, st->window, st->fg_gc,
+ st->width/2 - radius,
+ max * ratio,
+ radius*2, st->height * (1 - ratio));
+
+ /* fill left and right */
+ XFillRectangle (st->dpy, st->window, st->bg_gc,
+ 0, 0, st->width/2 - radius, st->height);
+ XFillRectangle (st->dpy, st->window, st->bg_gc,
+ st->width/2 + radius, 0, st->width/2, st->height);
+
+ /* fill top and bottom */
+ XFillRectangle (st->dpy, st->window, st->bg_gc,
+ 0, 0, st->width, max * ratio);
+ XFillRectangle (st->dpy, st->window, st->bg_gc,
+ 0, st->height - (max * ratio),
+ st->width, max);
+
+ /* cap top */
+ XFillArc (st->dpy, st->window, st->fg_gc,
+ st->width/2 - radius,
+ max * ratio - radius,
+ radius*2, radius*2,
+ 0, 180*64);
+
+ /* cap bottom */
+ XFillArc (st->dpy, st->window, st->fg_gc,
+ st->width/2 - radius,
+ st->height - (max * ratio + radius),
+ radius*2, radius*2,
+ 180*64, 180*64);
+ }
+ else /* starburst */