home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 November / CPNL0711.ISO / beeld / screen / hcf.exe / Basic / Basic_Image_033_DrawTextCircle.bas < prev    next >
BASIC Source File  |  2005-06-17  |  3KB  |  88 lines

  1. sImgBackground = "d:\\!cd_api_\\Print\\hintergrund.bmp"  ' Bildgr÷▀e 1200 x 1200 oder gr÷▀er
  2. sTextTop       = "Fragen, Antworten und Wⁿnsche unter: www.service.hardcopy.de  ╖  Questions, Answers, Suggestions & Wishes: www.service.hardcopy.de"
  3. sTextBottom    = "Copyright ⌐ 1983-2005 ╖ bla bla ╖ bla bla bla ╖ bla bla ╖ bla bla bla ╖ bla bla"
  4. sText1         = "Text1"
  5. sText2         = "Text2: 15.1.06"
  6. sText3         = "Text3 (rechts-  ):\nText4 (bⁿndig):"
  7. sText3a        = "Text3a (links-)" + "\n" + "Text4a (bⁿndig)"
  8.  
  9. If Image( 0 ).Open( sImgBackground ) < 1 Then
  10.     Dialog "Hintergrundbild kann nicht ge÷ffnet werden."
  11.     End Dialog
  12.     End
  13. EndIf
  14. w = Image(0).Width
  15. If w < 1200 Then w = 1200
  16. w2 = w / 2
  17. Image( 0 ).Resample( w, w ) 
  18.  
  19. Pen.Color = _ColorWhite
  20. Pen.Width = w + 1
  21. Image(0).Ellipse( -w2,-w2, w*2 , w*2 )
  22. Pen.Color = _ColorBlack
  23. Pen.Width = 1
  24. Image(0).Ellipse( -2,-2, w+4 , w+4 )
  25.  
  26. iRingBreiteAussen = w / 30
  27. Pen.Width  = iRingBreiteAussen
  28. Pen.Color = _ColorWhite
  29. Image(0).Ellipse( 0+Pen.Width/2,0+Pen.Width/2, w-Pen.Width,w-Pen.Width )
  30.  
  31. iRingBreiteInnen = w / 7
  32. Image(0).EllipseFill( w2-iRingBreiteInnen/2,w2-iRingBreiteInnen/2, iRingBreiteInnen,iRingBreiteInnen )
  33.  
  34. Font.Size  = w / 52
  35. Font.Color = _ColorBlue
  36. Font.Name  = "Courier New"
  37. Font.Bold  = true
  38. iRingBreiteAussen = iRingBreiteAussen *1.5
  39. Image(0).DrawTextCircle( iRingBreiteAussen/2,iRingBreiteAussen/2 , w-iRingBreiteAussen,w-iRingBreiteAussen , -90, 180, sTextTop )
  40. iRingBreiteAussen = iRingBreiteAussen *1.3
  41. Image(0).DrawTextCircle( iRingBreiteAussen/2,iRingBreiteAussen/2 , w-iRingBreiteAussen,w-iRingBreiteAussen , 120,-120, sTextBottom )
  42.  
  43. Font.Color = _ColorWhite
  44. Font.Name  = "Arial"
  45. Font.Bold  = true
  46. Font.Size  = w*0.12
  47. Font.Align = _FontAlignCenter
  48. Image(0).DrawText( 0,w*0.15, w,w, sText1 )
  49.  
  50. Font.Size  = w*0.04
  51. Font.Align = _FontAlignRight
  52. Image(0).DrawText( w2,w2-Font.Size/2, w2-Font.Size*2,w2, sText2 )
  53.  
  54. Font.Size  = w*0.048
  55. Font.Align = _FontAlignRight
  56. Image(0).DrawText( 0,w*0.65, w2,w2, sText3 )
  57.  
  58. Font.Align = _FontAlignLeft
  59. Image(0).DrawText( w*0.52,w*0.65, w2,w2, sText3a )
  60.  
  61. Redraw()
  62.  
  63. End  ' fⁿr die Verwendung mit TrueNet diese Zeile l÷schen
  64.  
  65. anzahl = 1
  66. Dialog "Anzahl"
  67.     "Anzahl:", anzahl
  68. End Dialog
  69.  
  70. fImage = "d:\\!cd_api_\\Print\\vorlage_ra.jpg"
  71. Image(0).Save( fImage, _Image_JFIF, 24,  2, "", "" ) 
  72.  
  73. f = "d:\\!cd_api_\\auscd"
  74.  
  75. fp = File.Open( f + ".tmp", "w" )
  76. File.Write( fp, "DEVICE=roboter_device_name\n" )
  77. File.Write( fp, "JOB_TYPE=BUILD+COMPARE+PRINT\n" )
  78. File.Write( fp, "BUILD_TYPE=ISO_CD\n" )
  79. File.Write( fp, "BUILD_PATH=d:\\CD_daten\n" )
  80. File.Write( fp, "PRINT_TEMPLATE=d:\\!cd_api_\\Print\\vorlage_mit_innenring.rpt\n" ) ' nur wegen der Gr÷▀e
  81. File.Write( fp, "PRINT_BACKGROUND=" + fImage + "\n" )
  82. File.Write( fp, "COPYRIGHT=xxx xxx\n" )
  83. File.Write( fp, "VOLUME=vvvvv\n" )
  84. File.Write( fp, "JOLIET=YES\n" )
  85. File.Write( fp, "QUANTITY=" + anzahl + "\n" )
  86. File.Close( fp )
  87. File.Rename( f + ".tmp", f + ".job" )
  88.