Files
harbour-core/harbour/contrib/gd/tests/bartest.prg
Francesco Saverio Giudice 2373b7f087 2007-04-14 13:36 UTC+0200 Francesco Saverio Giudice (info/at/fsgiudice.com)
* harbour/bin/bld.bat
     * added HB_USER_LIB var to bcc link line to make usable bldtest.bat
       Question: Is there a way to build from bcc adding contrib libs ?

   - harbour/contrib/gd/hbgd.txt
   + harbour/contrib/gd/doc/hbgd.txt
     * moved in doc dir

   + harbour/contrib/gd/doc/COPYING
     + gd copyright text (it's free for any use, but this file has to be
                          reported)

   + harbour/contrib/gd/include/entities.h
   + harbour/contrib/gd/include/gd.h
   + harbour/contrib/gd/include/gd_io.h
   + harbour/contrib/gd/include/gdcache.h
   + harbour/contrib/gd/include/gdfontg.h
   + harbour/contrib/gd/include/gdfontl.h
   + harbour/contrib/gd/include/gdfontmb.h
   + harbour/contrib/gd/include/gdfonts.h
   + harbour/contrib/gd/include/gdfontt.h
   + harbour/contrib/gd/include/gdfx.h
   + harbour/contrib/gd/include/gdhelpers.h
   + harbour/contrib/gd/include/jisx0208.h
   + harbour/contrib/gd/include/wbmp.h
     + include files for compiling in windows environment

   + harbour/contrib/gd/tests/digits/57chevy.gif
   + harbour/contrib/gd/tests/digits/7seg.gif
   + harbour/contrib/gd/tests/digits/brsd.gif
   + harbour/contrib/gd/tests/digits/digib.gif
   + harbour/contrib/gd/tests/digits/fdb.gif
   + harbour/contrib/gd/tests/digits/jelly.gif
   + harbour/contrib/gd/tests/digits/odb.gif
   + harbour/contrib/gd/tests/digits/odw.gif
   + harbour/contrib/gd/tests/digits/pdg.gif
   + harbour/contrib/gd/tests/digits/pdw.gif
     + digits images for counter.prg sample

   + harbour/contrib/gd/gdexternal.ch
     + external declarations for use with linker

   + harbour/contrib/gd/make_b32.bat
   + harbour/contrib/gd/makefile.bc
   + harbour/contrib/gd/tests/bldtest.bat
   + harbour/contrib/gd/tests/bldtest.sh
     + make files

   * harbour/contrib/gd/tests/images_in/conv_test.jpeg
   * harbour/contrib/gd/tests/images_in/gdlogobig.png
   * harbour/contrib/gd/tests/images_in/theclipper.gif
     * updated images (I got them corrupted, probably is CVS ?)

   * harbour/contrib/gd/README
   * harbour/contrib/gd/gd.prg
   * harbour/contrib/gd/gdbar.prg
   * harbour/contrib/gd/gdbarcod.prg
   * harbour/contrib/gd/gdchart.prg
   * harbour/contrib/gd/gdimage.prg
   * harbour/contrib/gd/gdwrp.c
   * harbour/contrib/gd/tests/animgif.prg
   * harbour/contrib/gd/tests/antialiased.prg
   * harbour/contrib/gd/tests/barms.prg
   * harbour/contrib/gd/tests/bartest.prg
   * harbour/contrib/gd/tests/counter.prg
   * harbour/contrib/gd/tests/gdtestcls.prg
   * harbour/contrib/gd/tests/test_out.prg
   * harbour/contrib/gd/tests/testdpi.prg
   * harbour/contrib/gd/tests/tostring.prg
     * fixed hbgd files

     ! Please test in other environment.
       I have built harbour as downloaded from CVS,
       no HB_COMPAT_XHB defined
2007-04-14 11:37:18 +00:00

91 lines
1.8 KiB
Plaintext

#define IMAGES_OUT "images_out/"
Function Main()
local bar
// // Creating some Color (arguments are R, G, B)
local black := {0,0,0}
local white := {255,255,255}
local blue := {0,0,255}
local yellon := {255,255,128}
local red := {255,0,0}
local ccode13 := "789136043666"
local ccode8 := "0421000"
// local ccode128 := "00011005100000000"
local ccode128 := "Code 128"
local nlower := 1 , nhight := 50
/* here is the list of arguments
1- Barcode Type 13,8 and 128
*/
bar := TCode():New(13)
/* Here is the list of the arguments
1 - Thickness
2 - Color of bars
3 - Color of spaces
4 - Resolution
5 - Text Font (0-5)
*/
bar:Configure( 70 , black, white, 2, 1 )
/* Here is the list of the arguments
1 - Width
2 - Height
3 - Filename (empty : display on screen)
4 - Background color */
bar:CreateBar( 205, 105,,white)
// 1 - code bar
bar:Draw13(ccode13)
// Build image
bar:Finish(2)
// EAN8
bar:= TCode():New(8)
bar:Configure( 70 , black, white, 2 , 1 )
bar:CreateBar( 154, 100,,white)
bar:Draw8(ccode8)
bar:Finish(8)
bar:ResizeImage()
// EAN128
bar:= TCode():New(128)
bar:Configure( 50 , black, white, 2 , 1 )
bar:CreateBar( 300, 400, IMAGES_OUT + "Bar128",white)
// 1- code bar
// 2- barcode types A/B/C
// A- Alphanumeric characters uppercase
// B- Alphanumeric characters upper and lowercase
// C- Numeric pairs of integer
bar:Draw128(cCode128,"B")
bar:Finish(2)
// BRAZIL-FEBRABAN
bar:= TCode():New(25)
bar:Configure( 25 , black, white, 1 , 1, , .T. )
bar:CreateBar( 560 ,60, IMAGES_OUT + "febraban", white )
bar:DrawI25("104995628545723070285700000008218000")
bar:Finish(8)
RETURN NIL