Syndication : Atom 1.0  RSS 2.0
Blogs des développeurs   »   .: Ogotcha :.

Article complet: Isométrie en VB net

30/04/2009

Permalink 20:15:38, Catégories: Récapitulatif .NET, Récapitulatif, VB.Net, Astuces, 552 mots   French (FR) , Ogotcha

[.NET] Isométrie en VB net

Voici une bref explication pour réussir à faire de l'isométrie en VB.Net

La théorie :

[Suite:]

La pratique :
 
Private function DrawIso() as bitmap 
 Dim g As Graphics 
 Dim Img As Bitmap 
 Img = New Bitmap(400, 400) 
 g = Graphics.FromImage(mapping) 
 
 'Initialisation du nombre de case 
 Dim NbrX, NbrY As Integer 
 NbrX = 10 
 NbrY = 10 
 
 Dim X, Y As Integer 
  X = 0 
  Y = 0 
 
  While Y < NbrY 
  While X < NbrX 
  Dim Img As Image = application.startuppath & "/sol.jpg" 
  'Coordonée pour le passage en 2D iso 
  Dim dec As Integer = NbrY * Img.Height / 2 
  Dim OrigX As Integer = (X - Y) * Img.Height / 2 + dec 
  Dim OrigY As Integer = (Y + X) * Img.Height / 4 
  'Application ratio 2/1 
  Dim ImgH As Integer = Truncate(Img.Height / 2) 
  Dim ImgL As Integer = Truncate(Img.Width) '* 2) 
  g.DrawImage(rotation(Img, -45), OrigX, OrigY, ImgL, ImgH) 
  X += 1 
  End While 
  Y += 1 
  X = 0 
  End While 
Return Img 
End Sub 

(Page suivante : Suite du code)

1 2 Page suivante »

Social Bookmarking:

                                     

Commentaires, Pingbacks:

Connectez-vous pour vous abonner à cet article:

Flux de commentaires pour cet article : Atom 1.0  RSS 2.0

Cet article n'a pas de Commentaires/Pingbacks pour le moment...

Vous devez être identifié pour poster un commentaire.

.: Ogotcha :.

Blog d'Ogotcha
Mon blog est là essentiellement pour partager mon expérience dans le monde du développement.

Catégories


Rechercher

<  Février 2012  >
Lun Mar Mer Jeu Ven Sam Dim
    1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29        

Syndiquez ce blog XML

Articles :

Commentaires :

 
 
 
 
Partenaires

Hébergement Web