Prev Top Next
Name

KXL_CopyStretchImageImm

Synopsis
KXL_CopyStretchImageImm -- The arbitrary rectangles of an image are expanded or reduced and it copies to a new image.

Description
KXL_Image *KXL_CopyStretchImageImm(KXL_Image *img, Sint16 src_l,
Sint16 src_t, Uint16 src_w, Uint16 src_h, Uint16 width, Uint16 height);

Arguments

imgPointer of KXL_Image structure.
src_lLeft position of a source image.
src_tTop position of a source image.
src_wWidth of a source image.
src_hHeight of a source image.
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_CopyStretchImageImm(img, 0, 0, img->Width, img->Height, 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;
}