Creates a new animation of the specified parameters.

Namespace:  SGP.XSpace
Assembly:  SGPRTL (in SGPRTL.dll)
Version: 1.2.3019.18825

Syntax

C#
public XSimpleSpriteAnimator AddAnimation(
	Bitmap bitmap,
	int w,
	int h,
	float x,
	float y,
	float x2,
	float y2
)

Parameters

bitmap
Type: System.Drawing..::.Bitmap
Image from which the animation will be created.
w
Type: System..::.Int32
Number of frames in the X axis, to which the image will be cut.
h
Type: System..::.Int32
Number of frames in the Y axis, to which the image will be cut.
x
Type: System..::.Single
Start animation X coordinate.
y
Type: System..::.Single
Start animation Y coordinate.
x2
Type: System..::.Single
End animation X coordinate.
y2
Type: System..::.Single
End animation Y coordinate.

Return Value

Returns the created XSimpleSpriteAnimator animation.

Exceptions

ExceptionCondition
System..::.ArgumentNullException bitmap is nullNothingnullptra null reference (Nothing in Visual Basic).

See Also