* contrib/hbziparc/ziparc.prg
! fixed using old IS*() macro w/o common.ch
* contrib/hbziparc/tests/unzipa.prg
* contrib/hbziparc/tests/zipa.prg
+ added #require directives
* contrib/hbgd/tests/animgif.prg
* contrib/hbgd/tests/antialia.prg
* contrib/hbgd/tests/barms.prg
* contrib/hbgd/tests/bartest.prg
* contrib/hbgd/tests/counter.prg
* contrib/hbgd/tests/gdtest.prg
* contrib/hbgd/tests/gdtestcl.prg
* contrib/hbgd/tests/test_out.prg
* contrib/hbgd/tests/testdpi.prg
* contrib/hbgd/tests/tostring.prg
* contrib/hbgd/tests/tpoly.prg
* examples/httpsrv/modules/showcounter.prg
* cleanups and fixes (replaced ISDIRECTORY() xhb function,
fixed Windows dir detection, added simpleio.ch)
* contrib/hbzebra/tests/testcair.prg
* contrib/hbzebra/tests/testhpdf.prg
* contrib/hbzebra/tests/testwin.prg
* contrib/rddads/tests/datad.prg
* contrib/rddads/tests/testmg.prg
+ added #require directives for testing
* contrib/hbfoxpro/misc.prg
* contrib/hbnf/clrsel.prg
* contrib/hbnf/menu1.prg
* contrib/hbnf/metaph.prg
* src/rtl/hbi18n2.prg
* utils/hbtest/rt_str.prg
* formatting (to help a grep case)
41 lines
921 B
Plaintext
41 lines
921 B
Plaintext
/*
|
|
* $Id$
|
|
*/
|
|
|
|
/*
|
|
* GD graphic library.
|
|
* graphic font DPI demo
|
|
*
|
|
* Copyright 2005 Francesco Saverio Giudice <info@fsgiudice.com>
|
|
*/
|
|
|
|
#include "gd.ch"
|
|
|
|
#define IMAGES_IN "imgs_in" + hb_ps()
|
|
#define IMAGES_OUT "imgs_out" + hb_ps()
|
|
|
|
PROCEDURE Main()
|
|
|
|
LOCAL oI := GDImage():Create( 600, 300 )
|
|
|
|
LOCAL black := oI:SetColor( 0, 0, 0 )
|
|
|
|
oI:SetColor( black )
|
|
oI:SetFontName( GetEnv( "WINDIR" ) + "\fonts\arial.ttf" )
|
|
oI:SetFontPitch( 10 )
|
|
|
|
// Resolution = 96 dpi, default
|
|
oI:SayFreeType( 10, 100, "GD_RESOLUTION: 96 dpi" )
|
|
|
|
// Resolution = 150 dpi, using parameter 12
|
|
oI:SayFreeType( 10, 150, "GD_RESOLUTION: 150 dpi",,,,,,,, 150 )
|
|
|
|
// Resolution = 300 dpi, using parameter 12
|
|
oI:SayFreeType( 10, 200, "GD_RESOLUTION: 300 dpi",,,,,,,, 300 )
|
|
|
|
oI:SavePng( IMAGES_OUT + "testdpi.png" )
|
|
oI:SaveJpeg( IMAGES_OUT + "testdpi.jpg" )
|
|
oI:SaveGif( IMAGES_OUT + "testdpi.gif" )
|
|
|
|
RETURN
|