GrafX2 2.9.3227
The ultimate 256-color painting program
|
#include <string.h>
#include <stdlib.h>
#include "global.h"
#include "struct.h"
#include "transform.h"
#include "engine.h"
#include "screen.h"
#include "windows.h"
#include "input.h"
#include "help.h"
#include "misc.h"
#include "readline.h"
#include "buttons.h"
#include "pages.h"
#include "tiles.h"
Functions | |
void | Factorize (short *a, short *b) |
Reduces a fraction A/B to its smallest representation. ie (40,60) becomes (2/3) More... | |
short | Compute_dimension (short original_size, short new_ratio, short old_ratio) |
Multiplies original_size by new_ratio/old_ratio, but keeps result in 1-9999 range. More... | |
void | Button_Transform_menu (int btn) |
Opens and handles the Picture transform screen. More... | |
void Factorize | ( | short * | a, |
short * | b | ||
) |
Reduces a fraction A/B to its smallest representation. ie (40,60) becomes (2/3)
Referenced by Button_Transform_menu().
short Compute_dimension | ( | short | original_size, |
short | new_ratio, | ||
short | old_ratio | ||
) |
Multiplies original_size by new_ratio/old_ratio, but keeps result in 1-9999 range.
Referenced by Button_Transform_menu().
void Button_Transform_menu | ( | int | btn | ) |
Opens and handles the Picture transform screen.
References Backup_with_new_dimensions(), T_Document::backups, BUTTON_ADJUST, BUTTON_HELP, Close_window(), Compute_dimension(), Current_operation, Display_all_screen(), Display_cursor(), End_of_modification(), Factorize(), Flip_X_lowlevel(), Flip_Y_lowlevel(), Hide_cursor, T_Page::Image, T_Document::image_height, T_Document::image_is_modified, T_Document::image_width, INPUT_TYPE_INTEGER, Is_shortcut(), Key, KEY_ESC, KEY_h, KEY_l, KEY_NONE, KEY_r, KEY_w, KEY_x, KEY_y, LEFT_SIDE, Main, MC_Black, MC_Dark, MC_Light, Message_out_of_memory(), T_Page::Nb_layers, T_Page::Next, Num2str, Open_window(), OPERATION_SCROLL, T_List_of_pages::Pages, T_Image::Pixels, Print_in_window(), Print_in_window_limited(), Print_in_window_underscore(), Quit_is_required, Readline(), Redraw_layered_image(), Rescale(), RIGHT_SIDE, Rotate_180_deg_lowlevel(), Rotate_270_deg_lowlevel(), Rotate_90_deg_lowlevel(), Tilemap_update(), Unselect_button(), Update_window_area, Upload_infos_page(), Window_attribute2, Window_clicked_button(), Window_display_frame(), Window_dropdown_add_item(), Window_height, Window_help(), Window_set_dropdown_button(), Window_set_input_button(), Window_set_input_button_s(), Window_set_normal_button(), and Window_width.