(04-12-2012, 21:46)OrangePL Wrote: Please explain me how to draw an image using D3D9. Image format jpg/png. (if its possible )
You can actually draw an image following 2 ways:
1.) Simple way (NO-D3D, very easy, but only simple paintings)
2.) Sprites (D3D, hard enough, advanced painting like a boss)
BOTH OF THESE WAYS USE VB, BUT SINCE IT IS BASED ON .NET, YOU CAN INCLUDE VB FORM TO <some-other-language> PROJECT IN VISUAL STUDIO. Also, you haven't actually stated the language you work in so
WAY1:
I am currently working on my new supa-secret project and I use this method myself. The basis is set on e.Graphics, with its help you can easily draw something you need You can draw petty big number of simple shapes and if you are creative enough you can make something better from these shapes, like we made cool emblems in blops from simple shapes either. To see all possible commands open up some VS and in any sub write e.Graphics. and it will show you all commands and short description. To see full description + explanation of each command search @MSDN.
Graphics Class @MSDN: http://msdn.microsoft.com/en-us/library/...90%29.aspx
Example of usage:
VB Code
- e.Graphics.FillEllipse(New LinearGradientBrush(New Rectangle(0, e.LineRect.Top, 15, 15), Color.White, Color.PowderBlue, 45), 0, e.LineRect.Top, 15, 15)
- e.Graphics.DrawEllipse(Pens.PowderBlue, 0, e.LineRect.Top, 15, 15)
WAY2:
This way is described & explained in details on this web-page http://geekswithblogs.net/clingermangw/a...84484.aspx