home *** CD-ROM | disk | FTP | other *** search
/ Chip 2002 March / Chip_2002-03_cd1.bin / zkuste / delphi / kompon / d56 / SCLED10.ZIP / SCLED10 / README.txt next >
Text File  |  2001-12-30  |  5KB  |  140 lines

  1. TSCLED 1.0
  2. Dec 29, 2001
  3.  
  4. by Safak Cinar
  5. scinar@shaw.ca
  6. http://members.shaw.ca/safak
  7.  
  8. Based on the component TDynaLED 1.0 by Samson Fu 
  9.  
  10. LEGAL
  11. =====
  12.      
  13. You are free to use and modify this component in any project
  14. (freeware or commercial) but cannot sell or distribute
  15. the component itself (whether as source code or in
  16. compiled form), individually or bundled in a package without
  17. prior written consent from the author.
  18.  
  19. That out of the way, feel free to modify the code. If you publish
  20. your own component based on this one, make it freeware with
  21. full source code and drop me a note. Alternatively, you can send
  22. me your ideas, suggestions and bug reports and I will try to include
  23. the functionality in the next version, with proper credit of course.
  24.  
  25. DESCRIPTION
  26. ===========
  27.  
  28. TSCLED is a multiline dot matrix LED display emulator that uses a 
  29. monochrome offscreen bitmap to draw on. Text can be displayed using 
  30. any installed font and it has a dozen or so built in animation 
  31. sequences and custom draw functionality.
  32.  
  33. TSCLED is based on the component TDynaLED 1.0 by Samson Fu. You can 
  34. download his component from http://www.torry.net/leds.htm.
  35.  
  36. TSCLED displays a monochrome bitmap (accessible through BITMAP 
  37. property) with adjustable pixel size and inter pixel spacing. 
  38. Although this BITMAP is exposed, you need not use it directly when 
  39. simply displaying text, which you do by assigning strings to either 
  40. the CAPTION or LINES properties.
  41.  
  42. Most of the features are quite straightforward, with a couple of 
  43. exceptions:
  44.  
  45. * For LEDSTYLE, sclsSQUARE and sclsROUND yield identical looking 
  46. displays unless LEDSIZE is larger than 2 pixels.
  47.  
  48. * TSCLED has both a LINES and a CAPTION property. If LINES is empty, 
  49. CAPTION is used,otherwise LINES is used. It is a little easier using 
  50. LINES at design time when entering multi-line text.
  51.  
  52. * The AUTOSIZE property may not be what you expect. If it is set to 
  53. true, any change in LEDSIZE, LEDDISTANCE or LEDCOUNTX or LEDCOUNTY 
  54. will change the component size, in other words, component WIDTH and 
  55. HEIGHT become derived properties. Otherwise, LEDCOUNTX and LEDCOUNTY 
  56. are derived from the other properties. Mainly a design time convenience.
  57.  
  58. * CLIPMODE can either be set to sccmTEXT or sccmDISPLAY. If set to 
  59. sccmTEXT, the monochrome BITMAP will be the minimum size to 
  60. accomodate the text drawn on it. Otherwise, the BITMAP will be the 
  61. same size as display (ie LEDCOUNTX by LEDCOUNTY pixels). To better 
  62. visualize this, enable ONAFTERDRAW on the this demo page, which will 
  63. draw a frame around the BITMAP. As a rule of thumb, use sccmTEXT 
  64. unless you are doing custom drawing.
  65.  
  66. * ALIGNMENTH doesn not use Delphi's TALIGNMENT values but a custom 
  67. enumerated type. This is in anticipation of a later feature.
  68.  
  69. ANIMATION
  70. =========
  71.  
  72. The ANIMATE method takes 6 arguments:
  73.  
  74. Procedure Animate(Style,Interval,Steps:Integer;P1,P2,P3:Integer);
  75.  
  76. Style    : 1..13, the various animation styles.
  77. Interval : (Minimum) duration, in milliseconds, of each animation step
  78. Steps    : The  total number of animation steps
  79. P1,P2,P3 : Parameters. These are specific to each animation style.
  80.  
  81. Animation Styles:
  82.  
  83. 1 : Blink Foreground
  84.     (no parameters)
  85.  
  86. 2 : Blink Background
  87.     (no parameters)
  88.  
  89. 3 : Blink background and foreground (ie. Toggle)
  90.     (no parameters)
  91.  
  92. 4 : Stretch X
  93.     P1 = Angle (*1) increment (in degrees).
  94.     P2 = X coordinate of the vertical center line (*2)
  95. 5 : Stretch Y
  96.     P1 = Angle (*1) increment (in degrees).
  97.     P2 = Y coordinate of the horizontal center line (*2)
  98. 6 : Flip X
  99.     P1 = Angle increment (in degrees).
  100.     P2 = X coordinate of the vertical center line (*2)
  101. 7 : Flip Y
  102.     P1 = Angle increment (in degrees).
  103.     P2 = Y coordinate of the horizontal center line (*2)
  104. 8 : Pulasate 
  105.     P1 = Angle (*3) increment (in degrees).
  106.     P2 = X coordinate of the center point (*2)
  107.     P3 = Y coordinate of the center point (*2)
  108.  
  109. 9 : Rotate
  110.     P1 = Angle increment (in degrees).
  111.          For full cycle rotation Steps*P1 has to be a multiple of 360.
  112.     P2 = X coordinate of the center point (*2)
  113.     P3 = Y coordinate of the center point (*2)
  114.  
  115. 10: Scroll X
  116.     P1 = Pixel increment (can be negative).
  117.     P2 = Wraparound value. After this many pixels, "what goes around comes
  118.          around". For nice cyclic animation, make sure that
  119.            a. Steps is larger than or equal to Bitmap.Width 
  120.               or GetLEDCountX (depending on ClipMode).
  121.            b. Wraparound value is a multiple of pixel increment and steps.
  122.  
  123. 11: Scroll Y
  124.     P1 = Pixel increment (can be negative).
  125.     P2 = Wraparound value. Same considerations for "Scroll X" apply.
  126.  
  127. 12: Wipe X
  128.     P1 = Pixel increment (can NOT be negative).
  129.  
  130. 13: Wipe Y
  131.     P1 = Pixel increment (can NOT be negative).
  132.  
  133. Notes:
  134.   (1) Stretching uses cosecant in the transformation filter, hence the angle.
  135.   (2) Center of display is "SCLED.LEDCountX Div 2, SCLED.LEDCountY Div 2"
  136.       Center of text is "SCLED.Bitmap.Width Div 2, SCLED.Bitmap.Height Div 2"
  137.       In the demo animations display center has been used.
  138.   (3) Pulsating uses cosine in the transformation filter, hence the angle.
  139.  
  140.