Surface_save_part - hpgDesigns/hpgdesigns-dev.io GitHub Wiki

Notation

Description

Saves a cropped area of a surface to a file.

Parameters

  • id, index of the surface
  • fname, file name or path where to save it
  • x, (x, y) top left coordinate of the crop area
  • y
  • w, width of the crop area
  • h, height of the crop area

Return Values

This function has not return values.

Example Call

surface_save_part(surf, "surf.png", 0, 0, 5, 5);

Demonstrates saving the top left 5x5 pixel area of a surface as a portable network graphics relative to the working directory. NOTOC