Tonec.com Bringing Internet Technology Innovations to Market since 1991
  News Products Outsourcing About Us Contact Us
what's new?what's new? featuresfeatures samplessamples manualmanual downloaddownload buybuy
  Tonec Homepage
ProductsActive Imagesamples

Please view complete list of samples

Sample 7


Using True Type Fonts


Using True Type Fonts

truetype.vbs

DIM im1
'Create Object
Set im1 = CreateObject("ActiveImage.Images.1")


'Set path to true type fonts
im1.SetFontPathTTFAuto
'Set font size
im1.SetFontSizeTTF 24
'Set Font Name
im1.SetFontTTF "ariblk"


'Create empty canvass
im1.CreateImagePalette 300, 300


im1.SetAlphaColor 0,0,0,0
im1.Fill 1,1

'Set Color
im1.SetAlphaColor 128, 0, 192,0
'Draw a text with selected font
im1.DrawTextTTF 20, 20 , "tonec.com"

im1.SetFontSizeTTF 36

'Draw a text with selected font and angle
im1.DrawTextAngleTTF 50, 50 ,360-45, "TONEC.COM"
im1.SetAlphaColor 128, 192, 192,0
im1.DrawTextAngleTTF 50, 100 ,360-45, "tonec.com"

'Save image to a file
im1.WriteToFile "C:\truetype.png"
im1.SetImageType 1
im1.WriteToFile "C:\truetype.jpg"
Set im1 = Nothing


 truetype.png
 Picture 1. truetype.png (size - 6 Kb)

Next sample >> 

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

  TonecPrivacy Policy
  1999-2005. Tonec, Inc. All rights reserved.