Draw resizing windows by stretching them, like we used to under cairo

This commit is contained in:
K. Lange 2018-02-25 19:59:52 +09:00 committed by Kevin Lange
parent d2f1449a46
commit e5a0cc1920
2 changed files with 6 additions and 11 deletions

View File

@ -922,7 +922,12 @@ draw_finish:
_win_sprite.masks = NULL;
_win_sprite.blank = 0;
_win_sprite.alpha = ALPHA_EMBEDDED;
draw_sprite(yg->backend_ctx, &_win_sprite, window->x, window->y);
if (window == yg->resizing_window) {
draw_sprite_scaled(yg->backend_ctx, &_win_sprite, window->x + (int)yg->resizing_offset_x, window->y + (int)yg->resizing_offset_y, yg->resizing_w, yg->resizing_h);
} else {
draw_sprite(yg->backend_ctx, &_win_sprite, window->x, window->y);
}
if (window->anim_mode == YUTANI_EFFECT_FADE_OUT) {
list_insert(yg->windows_to_remove, window);

View File

@ -1,18 +1,9 @@
#include <math.h>
double floor(double x) {
return __builtin_floor(x);
}
int abs(int j) {
return __builtin_abs(j);
}
double exp(double x) {
return __builtin_exp(x);
}
#if 0
double floor(double x) {
if (x > -1.0 && x < 1.0) {
if (x >= 0) {
@ -34,4 +25,3 @@ double floor(double x) {
int abs(int j) {
return (j < 0 ? -j : j);
}
#endif