Click here to Skip to main content
15,893,381 members
Articles / Web Development / ASP.NET

GHeat .NET

Rate me:
Please Sign up or sign in to vote.
5.00/5 (15 votes)
21 Jun 2010CPOL3 min read 223.9K   5.8K   53  
gheat ported to C#
Public Class StitchedTileTest

    Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Dim pm As New gheat.PointManager()
        Dim g As Graphics
        Dim tempImage As System.Drawing.Bitmap
        Dim zoom As Integer = 4
        Dim startX As Integer = 2
        Dim startY As Integer = 5
        Dim maxX As Integer = startX + 10
        Dim maxY As Integer = startY + 10
        Dim canvasImage As New System.Drawing.Bitmap(maxX * 256 - (startX * 256), maxY * 256 - (startY * 256), System.Drawing.Imaging.PixelFormat.Format32bppArgb)

        gheat.Settings.BaseDirectory = "..\..\..\gheatWeb\__\etc\"

        g = Graphics.FromImage(canvasImage)

        pm.LoadPointsFromFile("..\..\..\points.txt")

        For x As Integer = startX To maxX
            For y As Integer = startY To maxY
                tempImage = gheat.GHeat.GetTile(pm, "classic", zoom, x, y)
                g.DrawImage(tempImage, New System.Drawing.PointF(x * 256 - (startX * 256), y * 256 - (startY * 256)))
            Next
        Next
        PictureBox1.Image = canvasImage
    End Sub
End Class

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer
United States United States
Graduate of University of Louisiana at Lafayette in computer science.

Comments and Discussions