home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 November / CPNL0711.ISO / beeld / screen / hcf.exe / Basic / Basic_Font_001_Align.bas < prev    next >
BASIC Source File  |  2003-11-26  |  735b  |  26 lines

  1. Sub SubAlign( x As Integer, s As String )
  2.  
  3. Image(0).Rectangle(x,20, 200,15 )
  4. Image(0).DrawText( x,20, 200,15, s )
  5.  
  6. Image(0).Rectangle(x,50, 200,30 )    
  7. Image(0).DrawText( x,50, 200,30, "Image(0).DrawText(...  with\nNewline" )
  8.      
  9. Image(0).Rectangle(x,90, 200,70 )    
  10. Image(0).DrawText( x,90, 200,70, "Lines are automatically broken between words if a word would extend past the edge of the rectangle." )     
  11. EndSub
  12.  
  13. Image( 0 ).Resample( 660,200 )
  14. Image( 0 ).Color = _ColorWhite
  15. Pen.Color = _ColorMoccasin
  16.  
  17. Font.Align =    _FontAlignLeft
  18. SubAlign( 10, "_FontAlignLeft" )
  19.  
  20. Font.Align =    _FontAlignCenter
  21. SubAlign( 220, "_FontAlignCenter" )
  22.  
  23. Font.Align =    _FontAlignRight
  24. SubAlign( 440, "_FontAlignRight" )
  25. Redraw()
  26.