ASP Painter
Home
Home
Samples
Samples
Purchase
Purchase
Download
Download
Documentation
Documentation


ASPPainter::Text::DrawBlendingText.vbs

							
'============================================================
'Sample DrawBlendingText.vbs

' This sample shows how the text output quality is changing, depending 
' on SetBlendingMode and SetBlendingQuality parameters. As you can see,
' in the case of using SetBlendingMode method, it is possible to specify
' whether the text and the background will be blended. The SetBlendingQuality
' method gives a possibility to set the quality if blending.
'============================================================
Dim pic
Set pic = CreateObject("ASPPainter.Pictures.1")
hl = "Blending Text"
pic.SetBKColor 255,255,255,225
pic.Create 300, 300

w = pic.Width
h = pic.Height

pic.SetBlendingMode 0
pic.SetBlendingQuality 0

pic.SetFontName "arial"
pic.SetFontSize 24
pic.SetColor 0,0,0,255
pic.SetFontAntialias 1
pic.SetFontOrientation 0
fontHeight = pic.GetFontHeight
pic.TextOut 30, 50 , hl & "1"

pic.SetBlendingMode 1
pic.SetBlendingQuality 0
pic.TextOut 30, 50+fontHeight , hl & "2"

pic.SetBlendingMode 1
pic.SetBlendingQuality 3
pic.TextOut 30, 50+2*fontHeight , hl & "3"

pic.SetFormat 0
pic.SaveToFile "C:\dbt.png"
pic.SetFormat 5
'pic.SetTiffCompression 1
pic.SetTiffColorDepth 24
pic.SaveToFile "C:\dbt_24_tiff.tif"
pic.SetTiffColorDepth 32
pic.SaveToFile "C:\dbt_32_tiff.tif"
pic.Destroy
pic.DestroyALL
Set pic = Nothing
Picture 1.
dbt.png
Picture 2.
dbt_24_tiff.tif
Picture 3.
dbt_32_tiff.tif

More samples:

Arc, Beziers, Circle, Ellipse, Line, Pie, Rectangle, Unclosed polygon

See also:

SetHTMLColor, SetBKColor, Create, SetColor , SetLineWidth , DrawArc , DrawFilledRectangle , DrawBezier , DrawCircle , DrawFilledCircle , DrawEllipse , DrawFilledEllipse , DrawRectangle , DrawUnclosedPolygon , SaveToFile , DestroyALL



home samples purchase documentation download