Prev Top Next

Name
KXL_CopyStretchImage
Synopsis

    KXL_CopyStretchImage -- An image are expanded or reduced and it copies to a new image.

Description

    KXL_Image *KXL_CopyStretchImage(KXL_Image *img, Uint16 width, Uint16 height);

Arguments

img | Pointer of KXL_Image structure.
width | New width
height | New 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_CopyStretchImage(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;
    }