bitmap-scale-absolute

Synopsis

(bitmap-scale-absolute bitmap new-width new-height)

Parameters

  • bitmap
  • new-width
  • new-height

Description

Passing 0 in either new-width or new-height leaves the aspect ratio intact.

Side Effects

Return Value

A new scaled bitrmap is returned with the desired width and height.

Example

> (define bm (bitmap-create 1024 768))
bm
> bm
#<bitmap orow:-1 ocol:-1 xres:-1 yres:-1 w:1024 h:768>
> (bitmap-scale-absolute bm 640 0)
#<bitmap orow:-1 ocol:-1 xres:-1 yres:-1 w:640 h:480>
> (bitmap-scale-absolute bm 0 600)
#<bitmap orow:-1 ocol:-1 xres:-1 yres:-1 w:800 h:600>
>