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:\AI\truetype.png" im1.SetImageType 1 im1.WriteToFile "C:\AI\truetype.jpg" Set im1 = Nothing
> Picture 1. truetype.png (size - 6 Kb) |
If you have any questions or bug reports, write to active.image@tonec.com for technical support.