View Single Post
03-15-14, 12:27 PM   #20
Duugu
Premium Member
 
Duugu's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 851
I ended up with building the cooldown image set myself. (I need single files, transparent border, etc.)

It took me a while to search for a usefull approach to build the files. So I just thought I should add a few lines over here showing my solution for everyone else who needs to do this in the future.

An easy way to build image files is a very simple and small vb.net app. Like this one:

Code:
Dim blackPen As New Pen(Color.Black, 1)
Dim filePath As String = "E:\CD\"
Dim count As Integer = 0
Dim bmp As Bitmap = New Bitmap(64, 64)
Dim g As Graphics = Graphics.FromImage(bmp)

g.Clear(Color.Transparent)
bmp.Save(filePath & count & ".png", System.Drawing.Imaging.ImageFormat.Png)
count = count + 1

For x = 32 To 62
   g.DrawLine(blackPen, 32, 32, x, 1)
   bmp.Save(filePath & count & ".png", System.Drawing.Imaging.ImageFormat.Png)
   count = count + 1
Next
For x = 1 To 62
   g.DrawLine(blackPen, 32, 32, 62, x)
   bmp.Save(filePath & count & ".png", System.Drawing.Imaging.ImageFormat.Png)
   count = count + 1
Next
For x = 62 To 1 Step -1
   g.DrawLine(blackPen, 32, 32, x, 62)
   bmp.Save(filePath & count & ".png", System.Drawing.Imaging.ImageFormat.Png)
   count = count + 1
Next
For x = 62 To 1 Step -1
   g.DrawLine(blackPen, 32, 32, 1, x)
   bmp.Save(filePath & count & ".png", System.Drawing.Imaging.ImageFormat.Png)
   count = count + 1
Next
For x = 1 To 32
   g.DrawLine(blackPen, 32, 32, x, 1)
   bmp.Save(filePath & count & ".png", System.Drawing.Imaging.ImageFormat.Png)
   count = count + 1
Next
It builds image files for a 64x64 cooldown fake-animation.

The Graphics class provides a lot of drawing functions. You can use them to build fake-animations for lot of different custom shapes.

Last edited by Duugu : 03-15-14 at 12:31 PM.
  Reply With Quote