+ tests/stripeol.hb
+ added script to strip spaces at EOL
* contrib/gtalleg/tests/test.prg
* contrib/gtwvg/tests/demoxbp.prg
* contrib/gtwvg/tests/wvgactivex.prg
* contrib/gtwvg/tests/wvgxbp.prg
* contrib/gtwvg/wvgclass.prg
* contrib/hbamf/tests/tstendin.prg
* contrib/hbbz2/tests/test.prg
* contrib/hbcairo/tests/fancytxt.prg
* contrib/hbcairo/tests/table.prg
* contrib/hbct/ctrand.prg
* contrib/hbct/doc/en/addascii.txt
* contrib/hbct/doc/en/atadjust.txt
* contrib/hbct/doc/en/count.txt
* contrib/hbct/doc/en/ct.txt
* contrib/hbct/doc/en/ctc.txt
* contrib/hbct/doc/en/ctmath.txt
* contrib/hbct/doc/en/ctmath2.txt
* contrib/hbct/doc/en/ctpad.txt
* contrib/hbct/doc/en/ctstr.txt
* contrib/hbct/doc/en/datetime.txt
* contrib/hbct/doc/en/dattime2.txt
* contrib/hbct/doc/en/exponent.txt
* contrib/hbct/doc/en/finan.txt
* contrib/hbct/doc/en/ftoc.txt
* contrib/hbct/doc/en/justify.txt
* contrib/hbct/doc/en/keyset.txt
* contrib/hbct/doc/en/misc1.txt
* contrib/hbct/doc/en/num1.txt
* contrib/hbct/doc/en/numat.txt
* contrib/hbct/doc/en/numconv.txt
* contrib/hbct/doc/en/pos1.txt
* contrib/hbct/doc/en/pos2.txt
* contrib/hbct/doc/en/posdiff.txt
* contrib/hbct/doc/en/print.txt
* contrib/hbct/doc/en/range.txt
* contrib/hbct/doc/en/relation.txt
* contrib/hbct/doc/en/remove.txt
* contrib/hbct/doc/en/replace.txt
* contrib/hbct/doc/en/screen1.txt
* contrib/hbct/doc/en/strdiff.txt
* contrib/hbct/doc/en/strswap.txt
* contrib/hbct/doc/en/token1.txt
* contrib/hbct/doc/en/token2.txt
* contrib/hbct/doc/en/trig.txt
* contrib/hbct/doc/en/video.txt
* contrib/hbct/doc/en/wordtoch.txt
* contrib/hbct/getinfo.prg
* contrib/hbfimage/tests/fitest.prg
* contrib/hbgd/gdimage.prg
* contrib/hbgd/tests/counter.prg
* contrib/hbgd/tests/gdtest.prg
* contrib/hbgd/tests/gdtestcl.prg
* contrib/hbgd/tests/test_out.prg
* contrib/hbide/idetags.prg
* contrib/hblzf/tests/test2.prg
* contrib/hbmisc/doc/en/ht_conv.txt
* contrib/hbmisc/fcomma.prg
* contrib/hbmisc/fileread.prg
* contrib/hbmisc/hbedit.prg
* contrib/hbnf/anomatch.prg
* contrib/hbnf/calendar.prg
* contrib/hbnf/clrsel.prg
* contrib/hbnf/dispmsg.prg
* contrib/hbnf/doc/en/aading.txt
* contrib/hbnf/doc/en/aavg.txt
* contrib/hbnf/doc/en/acctadj.txt
* contrib/hbnf/doc/en/acctmnth.txt
* contrib/hbnf/doc/en/acctqtr.txt
* contrib/hbnf/doc/en/acctweek.txt
* contrib/hbnf/doc/en/acctyear.txt
* contrib/hbnf/doc/en/adessort.txt
* contrib/hbnf/doc/en/aemaxlen.txt
* contrib/hbnf/doc/en/aeminlen.txt
* contrib/hbnf/doc/en/amedian.txt
* contrib/hbnf/doc/en/anomatch.txt
* contrib/hbnf/doc/en/any2any.txt
* contrib/hbnf/doc/en/aredit.txt
* contrib/hbnf/doc/en/asum.txt
* contrib/hbnf/doc/en/at2.txt
* contrib/hbnf/doc/en/bitclr.txt
* contrib/hbnf/doc/en/bitset.txt
* contrib/hbnf/doc/en/blink.txt
* contrib/hbnf/doc/en/byt2bit.txt
* contrib/hbnf/doc/en/byt2hex.txt
* contrib/hbnf/doc/en/byteand.txt
* contrib/hbnf/doc/en/byteneg.txt
* contrib/hbnf/doc/en/bytenot.txt
* contrib/hbnf/doc/en/bytexor.txt
* contrib/hbnf/doc/en/calendar.txt
* contrib/hbnf/doc/en/chdir.txt
* contrib/hbnf/doc/en/cntryset.txt
* contrib/hbnf/doc/en/color2n.txt
* contrib/hbnf/doc/en/d2e.txt
* contrib/hbnf/doc/en/datecnfg.txt
* contrib/hbnf/doc/en/dayofyr.txt
* contrib/hbnf/doc/en/daytobow.txt
* contrib/hbnf/doc/en/dfile.txt
* contrib/hbnf/doc/en/diskfunc.txt
* contrib/hbnf/doc/en/dispc.txt
* contrib/hbnf/doc/en/dispmsg.txt
* contrib/hbnf/doc/en/dosver.txt
* contrib/hbnf/doc/en/e2d.txt
* contrib/hbnf/doc/en/easter.txt
* contrib/hbnf/doc/en/elapsed.txt
* contrib/hbnf/doc/en/findith.txt
* contrib/hbnf/doc/en/floptst.txt
* contrib/hbnf/doc/en/ftattr.txt
* contrib/hbnf/doc/en/ftidle.txt
* contrib/hbnf/doc/en/ftisprn.txt
* contrib/hbnf/doc/en/ftround.txt
* contrib/hbnf/doc/en/fttext.txt
* contrib/hbnf/doc/en/gcd.txt
* contrib/hbnf/doc/en/getenvrn.txt
* contrib/hbnf/doc/en/hex2dec.txt
* contrib/hbnf/doc/en/iamidle.txt
* contrib/hbnf/doc/en/isbit.txt
* contrib/hbnf/doc/en/isbiton.txt
* contrib/hbnf/doc/en/isshare.txt
* contrib/hbnf/doc/en/kspeed.txt
* contrib/hbnf/doc/en/linked.txt
* contrib/hbnf/doc/en/madd.txt
* contrib/hbnf/doc/en/menutonf.txt
* contrib/hbnf/doc/en/metaph.txt
* contrib/hbnf/doc/en/miltime.txt
* contrib/hbnf/doc/en/month.txt
* contrib/hbnf/doc/en/netpv.txt
* contrib/hbnf/doc/en/nooccur.txt
* contrib/hbnf/doc/en/ntow.txt
* contrib/hbnf/doc/en/nwlstat.txt
* contrib/hbnf/doc/en/nwsem.txt
* contrib/hbnf/doc/en/nwuid.txt
* contrib/hbnf/doc/en/ontick.txt
* contrib/hbnf/doc/en/origin.txt
* contrib/hbnf/doc/en/page.txt
* contrib/hbnf/doc/en/pchr.txt
* contrib/hbnf/doc/en/peek.txt
* contrib/hbnf/doc/en/pending.txt
* contrib/hbnf/doc/en/poke.txt
* contrib/hbnf/doc/en/popadder.txt
* contrib/hbnf/doc/en/proper.txt
* contrib/hbnf/doc/en/prtesc.txt
* contrib/hbnf/doc/en/putkey.txt
* contrib/hbnf/doc/en/qtr.txt
* contrib/hbnf/doc/en/rand1.txt
* contrib/hbnf/doc/en/savearr.txt
* contrib/hbnf/doc/en/scregion.txt
* contrib/hbnf/doc/en/setdate.txt
* contrib/hbnf/doc/en/setkeys.txt
* contrib/hbnf/doc/en/setlastk.txt
* contrib/hbnf/doc/en/settime.txt
* contrib/hbnf/doc/en/sinkey.txt
* contrib/hbnf/doc/en/sleep.txt
* contrib/hbnf/doc/en/sqzn.txt
* contrib/hbnf/doc/en/sysmem.txt
* contrib/hbnf/doc/en/tbwhile.txt
* contrib/hbnf/doc/en/tempfile.txt
* contrib/hbnf/doc/en/vertmenu.txt
* contrib/hbnf/doc/en/vidcur.txt
* contrib/hbnf/doc/en/vidmode.txt
* contrib/hbnf/doc/en/wda.txt
* contrib/hbnf/doc/en/week.txt
* contrib/hbnf/doc/en/workdays.txt
* contrib/hbnf/doc/en/woy.txt
* contrib/hbnf/doc/en/xbox.txt
* contrib/hbnf/doc/en/year.txt
* contrib/hbnf/ftround.prg
* contrib/hbnf/metaph.prg
* contrib/hbnf/nwsem.prg
* contrib/hbnf/nwuid.prg
* contrib/hbnf/pending.prg
* contrib/hbnf/popadder.prg
* contrib/hbnf/scregion.prg
* contrib/hbnf/tbwhile.prg
* contrib/hbnf/workdays.prg
* contrib/hbodbc/browodbc.prg
* contrib/hbqt/tests/browqt.prg
* contrib/hbqt/tests/dbfbrowserclass.prg
* contrib/hbqt/tests/testbrow.prg
* contrib/hbsqlit3/tests/blob.prg
* contrib/hbsqlit3/tests/sl3_test.prg
* contrib/hbxbp/tests/demoxbp.prg
* contrib/hbxbp/tests/dialogqt.prg
* contrib/hbxbp/xbpdataref.prg
* contrib/hbxbp/xbpmenubar.prg
* contrib/hbxbp/xbpprintdialog.prg
* contrib/hbxbp/xbpprinter.prg
* contrib/hbxbp/xbprtf.prg
* contrib/hbxbp/xbpscrollbar.prg
* contrib/xhb/cstruct.prg
* contrib/xhb/hblog.prg
* contrib/xhb/hterrsys.prg
* contrib/xhb/htjlist.prg
* contrib/xhb/sprintf.prg
* contrib/xhb/stream.prg
* contrib/xhb/tcgi.prg
* contrib/xhb/tedit.prg
* contrib/xhb/tfile.prg
* contrib/xhb/thtm.prg
* contrib/xhb/trpc.prg
* contrib/xhb/trpccli.prg
* contrib/xhb/ttable.prg
* contrib/xhb/txml.prg
* contrib/xhb/xcstr.prg
* contrib/xhb/xhberr.prg
* contrib/xhb/xhbmt.prg
* doc/cmpopt.txt
* doc/en/dbstrux.txt
* examples/hbapollo/array.prg
* examples/hbvpdf/hbvpdf.prg
* examples/hbvpdf/hbvpdft.prg
* examples/hbxlsxml/xlsxml_s.prg
* examples/hbxlsxml/xlsxml_y.prg
* examples/httpsrv/cgifunc.prg
* examples/httpsrv/cookie.prg
* examples/httpsrv/modules/cookie.prg
* examples/httpsrv/modules/info.prg
* examples/httpsrv/modules/showcounter.prg
* examples/httpsrv/modules/tableservletdb.prg
* examples/httpsrv/modules/testajax.prg
* examples/httpsrv/session.prg
* examples/httpsrv/uhttpd.prg
* include/hbclass.ch
* include/hbtrace.ch
* src/debug/dbgtinp.prg
* src/debug/debugger.prg
* src/debug/tbrwtext.prg
* src/rdd/usrrdd/rdds/hscdx.prg
* src/rtl/hbi18n2.prg
* src/rtl/valtoexp.prg
* formatting, fixed indentation, cleanups, deleting system specific information,
optimizing out platform dependent code, using hb_ntos()
323 lines
9.8 KiB
Plaintext
323 lines
9.8 KiB
Plaintext
/*
|
|
* $Id$
|
|
*/
|
|
|
|
/*
|
|
* Copyright 2004-2005 Francesco Saverio Giudice <info@fsgiudice.com>
|
|
*
|
|
* GD Class test file
|
|
*/
|
|
|
|
#include "gd.ch"
|
|
#include "simpleio.ch"
|
|
|
|
#define IMAGES_IN "imgs_in" + hb_ps()
|
|
#define IMAGES_OUT "imgs_out" + hb_ps()
|
|
|
|
PROCEDURE Main()
|
|
|
|
LOCAL black, blue, red, green, cyan, gray
|
|
LOCAL color
|
|
LOCAL oI, oI2, oI3, oI4, nThick, n, nSecs
|
|
LOCAL oI5
|
|
LOCAL oB
|
|
|
|
// LOCAL aClip
|
|
|
|
// SET GDFONTPATH=%WINDIR%\fonts
|
|
IF GetEnv( "GDFONTPATH" ) == ""
|
|
? "Please set GDFONTPATH"
|
|
? "On Windows: SET GDFONTPATH=%WINDIR%\fonts"
|
|
? "On Linux : export GDFONTPATH=/usr/share/fonts/default/TrueType"
|
|
?
|
|
ENDIF
|
|
/*
|
|
// Check output directory
|
|
IF !hb_DirExists( IMAGES_OUT )
|
|
DirMake( IMAGES_OUT )
|
|
ENDIF
|
|
*/
|
|
|
|
/* Create an image in memory */
|
|
oI := GDImage():Create( 200, 200 )
|
|
|
|
/* Load an image in memory from file */
|
|
oI2 := GDImage():LoadFromJpeg( IMAGES_IN + "conv_tst.jpg" )
|
|
oI5 := GDImage():LoadFromJpeg( IMAGES_IN + "conv_tst.jpg" )
|
|
|
|
/* Now work on first empty image */
|
|
|
|
/* Allocate drawing color */
|
|
black := oI:SetColor( 0, 0, 0 )
|
|
blue := oI:SetColor( 0, 0, 255 )
|
|
red := oI:SetColor( 255, 0, 0 )
|
|
green := oI:SetColor( 0, 255, 0 )
|
|
cyan := oI:SetColor( 0, 255, 255 )
|
|
|
|
/* Draw rectangle */
|
|
oI:Rectangle( 0, 0, 199, 199, .T. , cyan )
|
|
oI:Rectangle( 0, 0, 199, 199, , black )
|
|
|
|
oI:SetColor( blue )
|
|
|
|
/* Draw pixel */
|
|
oI:SetPixel( 50, 5 )
|
|
|
|
/* Draw lines */
|
|
oI:Line( 0, 0, 199, 199, blue )
|
|
oI:DashedLine( 0, 199, 199, 0, blue )
|
|
nThick := oI:SetThickness( 5 )
|
|
oI:Line( 50, 150, 100, 150 )
|
|
oI:SetThickness( nThick )
|
|
|
|
oI:AddStyle( red )
|
|
oI:AddStyle( red )
|
|
oI:AddStyle( red )
|
|
oI:AddStyle( gdTransparent )
|
|
oI:AddStyle( gdTransparent )
|
|
oI:AddStyle( gdTransparent )
|
|
oI:SetStyle()
|
|
oI:Line( 50, 180, 100, 180, gdStyled )
|
|
|
|
oI:ResetStyles()
|
|
oI:AddStyle( black )
|
|
oI:AddStyle( gdTransparent )
|
|
oI:SetStyle()
|
|
oI:Line( 50, 185, 100, 185, gdStyled )
|
|
|
|
|
|
/* Draw polygons */
|
|
oI:AddPoint( 10, 10 )
|
|
oI:AddPoint( 70, 10 )
|
|
oI:AddPoint( 80, 60 )
|
|
oI:Polygon()
|
|
|
|
oI:ResetPoints()
|
|
oI:AddPoint( 160, 180 )
|
|
oI:AddPoint( 170, 110 )
|
|
oI:AddPoint( 150, 160 )
|
|
oI:Polygon( , .T. , green )
|
|
|
|
/* Draw an arc */
|
|
oI:Arc( 50, 50, 40, 40, 30, 190, , red )
|
|
oI:Circle( 50, 150, 45, .T., green )
|
|
oI:Ellipse( 120, 120, 50, 20, , green )
|
|
|
|
/* Draw a character. */
|
|
oI:SetFontLarge()
|
|
? "Font Dims", oI:GetFontWidth(), oI:GetFontHeight()
|
|
oI:SetColor( black )
|
|
//__OutDebug( "Font", font )
|
|
oI:Say( 0, 0, "Test" )
|
|
oI:Say( 0, 15, "P" )
|
|
oI:Say( 0, 30, "W" )
|
|
|
|
oI:SayVertical( 70, 90, "Test" )
|
|
oI:SayVertical( 70, 15, "P" )
|
|
oI:SayVertical( 70, 30, "W" )
|
|
|
|
oI:SayFreeType( 20, 30, "Test", "arial", 24, 15 )
|
|
oI:SayFreeType( 40, 70, "Test2" )
|
|
|
|
|
|
/* Set Clip Rectangle */
|
|
oI:SetClippingArea( 25, 25, 75, 75 )
|
|
|
|
/* Retrieve Clipping rectangle */
|
|
// aClip := oI:GetClippingArea()
|
|
? "Clipping rectangle values"
|
|
// ? hb_DumpVar( aClip )
|
|
|
|
/* Query functions */
|
|
|
|
color := oI:GetPixel( oI:Width() / 2, oI:Height() / 2 )
|
|
? "Pixel Color is: ", color
|
|
? "RGB Values: ", oI:Red( color ), oI:Green( color ), oI:Blue( color )
|
|
? "Alpha Value: ", oI:Alpha( color )
|
|
|
|
/* Write Images on files */
|
|
oI:SavePng( IMAGES_OUT + "rect.png" )
|
|
oI2:SavePng( IMAGES_OUT + "test.png" )
|
|
oI2:SaveJpeg( IMAGES_OUT + "test.jpg" )
|
|
oI2:SaveGif( IMAGES_OUT + "test.gif" )
|
|
//oI2:SaveWBmp( IMAGES_OUT + "vale1.bmp", black )
|
|
|
|
/* test copy functions */
|
|
|
|
//oI3 := GDImage():CreateTrueColor( oI2:Width * 2, oI2:Height * 2 )
|
|
//oI2:CopyResampled( 0, 0, oI2:Width, oI2:Height, 0, 0, oI3:Width, oI3:Height, oI3 )
|
|
//oI3:SaveJpeg("vale2.jpg")
|
|
|
|
|
|
nSecs := Seconds()
|
|
? "start copy zoomed"
|
|
oI3 := oI2:CopyZoomed( 150 )
|
|
? "end", Seconds() - nSecs
|
|
nSecs := Seconds()
|
|
? "start save"
|
|
oI3:SaveJpeg( IMAGES_OUT + "zoom.jpg" )
|
|
? "end", Seconds() - nSecs
|
|
|
|
nSecs := Seconds()
|
|
? "start clone & zoom"
|
|
oI2:Clone():Zoom( 200 )
|
|
? "end", Seconds() - nSecs
|
|
|
|
nSecs := Seconds()
|
|
? "start clone"
|
|
oI4 := oI5:Clone()
|
|
? "end", Seconds() - nSecs
|
|
|
|
nSecs := Seconds()
|
|
? "start zoom"
|
|
oI4:Zoom( 200 )
|
|
? "end", Seconds() - nSecs
|
|
|
|
//__OutDebug( oI2:pImage )
|
|
//oI4:SetFontGiant()
|
|
gray := oI4:SetColor( 30, 30, 30 )
|
|
blue := oI4:SetColor( 0, 0, 200 )
|
|
|
|
//oI4:SetColor( black )
|
|
//oI4:Say( 100, 10, "Valentina" )
|
|
#if defined( __PLATFORM__UNIX )
|
|
oI4:SayFreeType( oI4:CenterWidth(), oI4:CenterHeight(), "GD power", "arib____", 40, 45 )
|
|
#else
|
|
nSecs := Seconds()
|
|
? "start write"
|
|
FOR n := 0 TO 350 STEP 10
|
|
oI4:SayFreeType( oI4:CenterWidth(), oI4:CenterHeight(), " GD Font Power", "arial", 20, n )
|
|
NEXT
|
|
? "end", Seconds() - nSecs
|
|
oI4:SetTransparent( blue )
|
|
oI4:SayFreeType( oI4:CenterWidth() - 4, oI4:CenterHeight() + 4, "GD", "verdana", 70, n, gray )
|
|
oI4:SayFreeType( oI4:CenterWidth(), oI4:CenterHeight(), "GD", "verdana", 70, n, blue )
|
|
#endif
|
|
oI4:SaveJpeg( IMAGES_OUT + "writing.jpg" )
|
|
|
|
|
|
//oI4 := __ObjClone( oI2 )
|
|
oI4 := oI2:Clone()
|
|
|
|
nSecs := Seconds()
|
|
? "start rotate outside"
|
|
oI2:Rotate( 45 )
|
|
? "end", Seconds() - nSecs
|
|
oI2:SaveJpeg( IMAGES_OUT + "rotateout.jpg" )
|
|
|
|
nSecs := Seconds()
|
|
? "start rotate inside"
|
|
oI4:RotateInside( 45 )
|
|
? "end", Seconds() - nSecs
|
|
//oI2:CopyRotated( , , , , , , 90, oI4 )
|
|
oI4:SaveJpeg( IMAGES_OUT + "rotatein.jpg" )
|
|
|
|
|
|
oI5:Zoom( 40 )
|
|
//oI5:Rotate( 90 )
|
|
blue := oI5:SetColor( 0, 0, 200 )
|
|
oI5:SayFreeType( oI5:CenterWidth(), oI5:CenterHeight(), "GD", "verdana", 20, 0, blue )
|
|
oI5:SaveJpeg( IMAGES_OUT + "gd_zoom.jpg" )
|
|
|
|
|
|
oI5 := GDChart():New( 400, 400 )
|
|
// Define piece colors
|
|
blue := oI5:SetColor( 0, 0, 200 )
|
|
gray := oI5:SetColor( 30, 30, 30 )
|
|
green := oI5:SetColor( 0, 250, 0 )
|
|
red := oI5:SetColor( 250, 0, 0 )
|
|
|
|
// Load an image as brush
|
|
oB := GDImage():LoadFromGif( IMAGES_IN + "harbour.gif" )
|
|
oB:Zoom( 15 )
|
|
|
|
//oI5:Circle( 200, 200, oI5:Width() )
|
|
//oI5:Line( 0, 200, 200, 200 )
|
|
|
|
oI5:AddDef( "FONTPITCH", "GIANT" )
|
|
|
|
oI5:SetData( { ;
|
|
{ "LABEL" => "One" , "VALUE" => 10, "COLOR" => blue , "FILLED" => .T. , "EXTRUDE" => 40/*, "TILE" => oB*/ }, ;
|
|
{ "LABEL" => "Two" , "VALUE" => 35, "COLOR" => gray , "FILLED" => .T. , "FONT" => { "NAME" => "Verdana", "PITCH" => 12, "ANGLE" => 0, "COLOR" => red } }, ;
|
|
{ "LABEL" => "Three", "VALUE" => 55, "COLOR" => green, "FILLED" => .T. }, ;
|
|
{ "LABEL" => "Four" , "VALUE" => 55, "FILLED" => .T. , "TILE" => oB }, ;
|
|
{ "LABEL" => "Five" , "VALUE" => 55, "COLOR" => red , "FILLED" => .T. , "EXTRUDE" => 20 }, ;
|
|
{ "LABEL" => "Six" , "VALUE" => 55, "FILLED" => .T. , "TILE" => oB }, ;
|
|
{ "LABEL" => "Seven", "VALUE" => 55, "FILLED" => .T. , "COLOR" => green } ;
|
|
} )
|
|
|
|
//oI5:VerticalBarChart()
|
|
oI5:PieChart()
|
|
|
|
|
|
oI5:SaveJpeg( IMAGES_OUT + "pie.jpg" )
|
|
|
|
oI5 := GDChart():New( 640, 480 )
|
|
// Define piece colors
|
|
blue := oI5:SetColor( 0, 0, 200 )
|
|
gray := oI5:SetColor( 30, 30, 30 )
|
|
green := oI5:SetColor( 0, 250, 0 )
|
|
red := oI5:SetColor( 250, 0, 0 )
|
|
|
|
// Load an image as brush
|
|
oB := GDImage():LoadFromJpeg( IMAGES_IN + "conv_tst.jpg" )
|
|
oB:Zoom( 15 )
|
|
|
|
// oI5:AddDef( "MAXVALUE", 150 )
|
|
oI5:AddDef( "AXISPICT", "@E 999999" )
|
|
oI5:AddDef( "FONTPITCH", "GIANT" )
|
|
oI5:AddDef( "COLOR", blue )
|
|
|
|
//oI5:AddSeries( "LABEL" => "Primo",;
|
|
// "VALUES" => { 10, 23, 54, 11, 32, 25 }, ;
|
|
// "COLOR" => blue )
|
|
|
|
/*
|
|
oI5:SetData( { ;
|
|
{ "LABEL" => "One", "VALUE" => 1000, "COLOR" => blue, "FILLED" => .T., "EXTRUDE" => 40 },;
|
|
{ "LABEL" => "Two", "VALUE" => 3500, "COLOR" => gray, "FILLED" => .T., "FONT" => { "NAME" => "Verdana", "PITCH" => 12, "ANGLE" => 0, "COLOR" => red } },;
|
|
{ "LABEL" => "Three", "VALUE" => 5500, "COLOR" => green, "FILLED" => .T. }, ;
|
|
{ "LABEL" => "Four", "VALUE" => 6500, "FILLED" => .T., "TILE" => oB }, ;
|
|
{ "LABEL" => "Five", "VALUE" => 3400, "FILLED" => .T., "COLOR" => green }, ;
|
|
{ "LABEL" => "Six", "VALUE" => 10000 }, ;
|
|
{ "LABEL" => "Seven", "VALUE" => 0, "FILLED" => .T., "COLOR" => red }, ;
|
|
{ "LABEL" => "Eight", "VALUE" => -2200 }, ;
|
|
{ "LABEL" => "Nine", "VALUE" => -3600, "COLOR" => blue, "FILLED" => .T. } ;
|
|
} )
|
|
*/
|
|
|
|
|
|
oI5:SetData( { ;
|
|
{ "LABEL" => "One", "VALUE" => 10, "COLOR" => blue, "FILLED" => .T. , "EXTRUDE" => 40/*, "TILE" => oB*/ }, ;
|
|
{ "LABEL" => "Two", "VALUE" => 35, "COLOR" => gray, "FILLED" => .T. , "FONT" => { "NAME" => "Verdana", "PITCH" => 12, "ANGLE" => 0, "COLOR" => red } }, ;
|
|
{ "LABEL" => "Three", "VALUE" => 55, "COLOR" => green, "FILLED" => .T. }, ;
|
|
{ "LABEL" => "Four", "VALUE" => 65, "FILLED" => .T. , "TILE" => oB }, ;
|
|
{ "LABEL" => "Five", "VALUE" => 34, "FILLED" => .T. , "COLOR" => green }, ;
|
|
{ "LABEL" => "Six", "VALUE" => 100 }, ;
|
|
{ "LABEL" => "Seven", "VALUE" => 0, "FILLED" => .T. , "COLOR" => red }, ;
|
|
{ "LABEL" => "Eight", "VALUE" => - 0 }, ;
|
|
{ "LABEL" => "Nine", "VALUE" => - 0, "COLOR" => blue, "FILLED" => .T. } ;
|
|
} )
|
|
|
|
|
|
oI5:Clone():VerticalBarChart():SaveJpeg( IMAGES_OUT + "vertbars.jpg" )
|
|
|
|
oI5:Clone():HorizontalBarChart():SaveJpeg( IMAGES_OUT + "horzbars.jpg" )
|
|
|
|
oI5:LineChart()
|
|
oI5:SaveJpeg( IMAGES_OUT + "hystogram1.jpg" )
|
|
|
|
//oI4 := GDImage():CreateTrueColor( oI2:Width * 2, oI2:Height * 2 )
|
|
//oI2:CopyResampled( 0, 0, oI2:Width, oI2:Height, 0, 0, oI2:Width, oI2:Height, oI4 )
|
|
//oI2:CopyResampled( 0, 0, oI2:Width, oI2:Height, oI4:CenterWidth(), oI4:CenterHeight(), oI2:Width, oI2:Height, oI4 )
|
|
//oI4:SaveJpeg("vale3.jpg")
|
|
|
|
/* Destroy images in memory */
|
|
// Class does it auto
|
|
|
|
?
|
|
? "Look at " + IMAGES_OUT + " folder for output images"
|
|
?
|
|
|
|
RETURN
|