Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

Drawing images?


  • Please log in to reply
No replies to this topic

#1 Wolfy87

Wolfy87

  • Members
  • 414 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:England
  • Local time:07:22 PM

Posted 19 December 2008 - 08:48 AM

I have 2500 numbers in an array all representing a corrosponding tile image, here is my code:

Sub Drawminimap()
		CounterA = 1
		coX = 0
		coY = 0
		For i As Integer = 0 To 2499
			Dim Minimap As New Bitmap(250, 250)
			Dim g As Graphics = Graphics.FromImage(Minimap)
			g.Clear(Color.Green)
			g.DrawImage("C:\Program Files\Phantom Coding\War Front\Terrain data\" + Mapdata(CounterA).ToString + ".png", coX, coY, 5, 5)
			MiniMapDisplay.Image = Minimap
			coX = coX + 5
			If coX > 245 Then
				coX = 0
				coY = coY + 5
			End If
			CounterA = CounterA + 1
		Next
	End Sub

I am trying to get it to go through the directory getting the right number and loading the right tile to create 2500 5 x 5 tiles, why wont the g.DrawImage work?

Thanks, Wolfy87.

BC AdBot (Login to Remove)

 





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users