Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int src_w = 1000;
- int src_h = 1000;
- int dst_w = 595;
- int dst_h = 824;
- int letter_h = ( dst_w * src_h ) / src_w;
- int pillar_w = ( dst_h * src_w ) / src_h;
- result.h = dst_h;
- result.w = pillar_w;
- if ( result.w > dst_w )
- {
- result.w = dst_w;
- result.h = letter_h;
- }
- result.x = ( dst_w - result.w ) / 2;
- result.y = ( dst_h - result.h ) / 2;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement