Sign in to follow this  

Manage C# DriectX9 Draw2D

Recommended Posts

I make a tga file that include 12 smaller texture pictures: (Blue images is how is show on screen) it look like Bluetexture width is like 51.2222222223 something White is a copy from orginal tga file I copy/paste all 11 pic so I acn show the error Here me Draw2D code and the rem is what me understand:
	spriteTexture,						// the loaded Texture
	new Rectangle((wX - 50) * 50, 0, 50, 50),			// where on texture u like show
								// wX is 50 at start 50-50=0 and texture 0 is emty
	new Rectangle(0, 0, 50, 50),				// show on screen (?, ? width, height)
	new Point(X),						// where is center
	(float)X,						// Angle
	new Point(X, Y),						// position
	Color.Purple						// texture color

My question: if I know 0-49 = texture 0 50-99 = texture 1 100-149 = texture 2 and so on is right Can it be picture that is wrong or do I miss anything in code? [Edited by - mobii on March 28, 2005 11:34:45 AM]

Share this post

Link to post
Share on other sites
I try explain better:
I take out pictures from t

Example try take out picture 6 from row 0:
ar.Add(new Art(1000, 1000, 1, 11)); // Add new Sprite
((Art)ar[0]).Draw(sprite, spriteTexture, X, Y, 0, 6, Color.White); // Draw Sprite 6

public void Draw(Sprite sprite, Texture t, int X, int Y, int r, int c, Color Col)
new Rectangle(X * 50 ,Y * 50, 50, 50),
System.Drawing.Rectangle.Empty, // this Rectangle I no know what does (or no work so me put as Emty)
new System.Drawing.Point(X, Y),

I get this Graphical error:
the Blue is what me get on screen
and White is Texture spriteTexture
small Texturepicture is (0-49 * 0-49)

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this