Added aspect ratio scaling to draw_image_scaled.

Rewrote create_message_window script function in C++.
This commit is contained in:
NovaRain
2019-05-11 08:49:30 +08:00
parent 4b221b5367
commit a63ea24572
6 changed files with 35 additions and 50 deletions
+2 -2
View File
@@ -594,9 +594,9 @@ Some utility/math functions are available:
Optional arguments:
- frame: frame number, the first frame starts from zero
- x/y: offset relative to the top-left corner of the window
- width/height: image size, used to scale the image when displaying it
- width/height: image size, used to scale the image when displaying it. Pass -1 to either width or height to keep aspect ratio when scaling
- noTransparent: pass true to display an image without transparent background
- NOTE: to omit optional arguments, call the functions with different sfall_funcX (e.g. sfall_func4("draw_image", pathFile, frame, x, y))
- NOTE: to omit optional arguments starting from the right, call the functions with different sfall_funcX (e.g. sfall_func4("draw_image", pathFile, frame, x, y))
- if draw_image_scaled is called without x/y/width/height arguments, the image will be scaled to fit the window without transparent background
------------------------