Home... About... Arrange... FAQ... Customers...

Sample 20 - Drawing text with a shadow

The sample shows how to create a text with a shadow.

shadow.vbs


Dim im
Dim width, height, str


width = 350
height = 70
str = "Shadow Text"

Set im = CreateObject("ActiveImage.Images.1")
im.CreateImage width, height
im.SetImageType 1

im.CreateImage width, height
im.SetColor 255,255,0
im.DrawFilledRectangle 0,0,width, height
im.SetFontPathTTFAuto
im.SetFontSizeTTF 38

im.SetFontTTF "tahomabd"
'Set the text color
im.SetColor 20,20,150
im.DrawTextTTF 4,48,str

im.SetColor 255,255,230
im.DrawTextTTF 6,45,str

im.WriteToFile "C:\AI\shadow.jpg"
im.DestroyImage
Set im = Nothing



Picture 1. Shadow.jpg (size - 6,1Kb)


If you have any questions or bug reports, write to active.image@tonec.com for technical support.


© 2000-2001 All Rights Reserved

Tonec Inc., 16835 Algonquin Street #400, Huntington Beach, CA, 92649, fax: (509) 752-1450, e-mail: info@tonec.com