Jump to content
  • Advertisement
Sign in to follow this  

Manage C# DriectX9 Draw2D

This topic is 4894 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!