Prev Top Next
Name

KXL_StrechImage

Synopsis
KXL_StrechImage -- An image are expanded or reduced and it copies to a new image.
For the compatibility of 1.1.4 or earlier.

Description
KXL_Image *KXL_StrechImage(KXL_Image *img, Uint16 width, Uint16 height);

Arguments

imgPointer of KXL_Image structure.
widthNew width
heightNew height


Return Value

Pointer of new KXL_Image structure.


Exsample
sample.bmp


#include <KXL.h>

int main(void)
{
  KXL_Image *img, *copy_img;

  KXL_CreateWindow(100, 100, "sample", 0);
  img = KXL_LoadBitmap("sample.bmp", 0);
  copy_img = KXL_StrechImage(img, 78, 78);
  
  KXL_SetDrawColor(0x00, 0x00, 0xff);
  KXL_ClearFrameImm(0, 0, 100, 100);
  KXL_PutImage(img, 10, 10);
  KXL_PutImage(copy_img, 20, 20);
  KXL_UpDateImm(0, 0, 100, 100);
  getchar();
  KXL_DeleteImage(img);
  KXL_DeleteImage(copy_img);
  KXL_DeleteWindow();
  return 0;
}