0

i have a C#-Project and I would like to draw some Textures (Object: Texture2D) on a Bitmap-Object. I have no idea how to do that. Can anyone help me or send me a link to a page where i can read it? All i found in Google was how to convert a Bitmap into a Texture2D but thats not what i need...

For example: draw a Texture2D (100x100 pixels) on a bitmap with the top left corner at 10/20...

I already read something about a tool called texture-brush or something like that.

Here is a code-snippet:

//For the test, create a new bitmap
System.Drawing.Bitmap picture = new System.Drawing.Bitmap(250, 250);
//The already existing texture2d is called tile
//this is how i thought i could draw the Texture2D into the bitmap
picture.draw(tile, new Vector2(10, 25));
  • 1
    [Does this SO answer help you](http://stackoverflow.com/a/12495843/1305969)? – zx485 Jan 29 '17 at 13:04
  • What are you targetting: Winforms, WPF, ASP..? __Always__ tag your question correctly! - Since you mention `Texture2D`: Are you actually using xna or did you just come across `Texture2D`? – TaW Jan 29 '17 at 13:12
  • i am using XNA, and i have several tiles. Those tiles are Texture2D. And i want to create an image saved on a hard drive to use for example in a website or presentation or anything else –  Jan 29 '17 at 17:53

0 Answers0