Code: Select all
B = RGB(255,255,255) 'white
F = RGB(0,0,0) 'black
w = 800 'pixels
p= 100 'scale factor
set GflAx = Server.CreateObject("GflAx.GflAx")
GflAx.LineWidth = 1
GflAx.LineColor = F 'white
GflAx.FontName = Arial
GflAx.FontSize = 14
GflAx.UseTransparency = TRUE
GflAx.MaskColor = B
GflAx.NewBitmap w, 15, B 'width, height, background
GflAx.TextOut "cm",11,3,F
j=0
ppcm=100*96/254
for i = 1 to w step ppcm 'write the cm scale
GflAx.DrawLine i,1,i,12
GflAx.TextOut j,i+3,3,F
if ppcm/10>5 then
for k = i to i+ppcm step ppcm/10
GflAx.DrawLine k,1,k,3
next
end if
j=j+1
next
GflAx.ChangeColorDepth(4)
GflAx.SaveFormat = 3 '1=jpeg, 2=gif, 3=png
Response.ContentType = "image/png"
Response.BinaryWrite GflAx.SendBinary
Set GflAx = nothing
Can anyone see what I've done wrong, or offer some working code I could follow to find what I've done incorrectly?
Thanks,
Bruce