Home | All Classes | Grouped Classes | Index | Search

# CL_SpriteDescription::add_alphaclipped_frames_free

Adds images separated with pure alpha (within trans_limit).

    	void add_alphaclipped_frames_free(
    		CL_PixelBuffer provider, int xpos = 0, int ypos = 0, float trans_limit = 0.05f);

Parameters:

provider
  Image source.
xpos, ypos
  Upper left position where alpha cutting should begin.
trans_limit
  Amount of non-transparent alpha allowed before a pixel is not considered transparent.
delete_provider
  If true, deletes provider when sprite description is destroyed.

Detailed description:

The alpha clipper will cut out frames from an image based on the transparency in the picture. It scans the lines horizontally from top to bottom. As soon as a non-transarent pixel is discovered, the clipper finds the bounding box for that region and then moves on.

See also:

CL_SpriteDescription | CL_PixelBuffer

Questions or comments, write to the ClanLib mailing list.