GrafX2 2.9.3227
The ultimate 256-color painting program
transform.c File Reference
#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"
+ Include dependency graph for transform.c:

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...
 

Function Documentation

◆ Factorize()

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().

◆ Compute_dimension()

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().

◆ Button_Transform_menu()